/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @signatureAlgorithm = 'v2';
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('xtee', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model BindVariableRequest {
  lang?: string(name='Lang'),
  apiRegionId?: string(name='apiRegionId'),
  apiType?: string(name='apiType'),
  createType?: string(name='createType'),
  defineId?: string(name='defineId'),
  defineIds?: string(name='defineIds'),
  description?: string(name='description'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  exceptionValue?: string(name='exceptionValue'),
  id?: long(name='id'),
  outputField?: string(name='outputField'),
  outputType?: string(name='outputType'),
  params?: string(name='params'),
  paramsList?: string(name='paramsList'),
  regId?: string(name='regId'),
  sourceType?: string(name='sourceType'),
  title?: string(name='title', description='This parameter is required.'),
}

model BindVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model BindVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindVariableResponseBody(name='body'),
}

/**
 * @summary 变量绑定操作
 *
 * @param request BindVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindVariableResponse
 */
async function bindVariableWithOptions(request: BindVariableRequest, runtime: Util.RuntimeOptions): BindVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.apiRegionId)) {
    query['apiRegionId'] = request.apiRegionId;
  }
  if (!Util.isUnset(request.apiType)) {
    query['apiType'] = request.apiType;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.defineId)) {
    query['defineId'] = request.defineId;
  }
  if (!Util.isUnset(request.defineIds)) {
    query['defineIds'] = request.defineIds;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.exceptionValue)) {
    query['exceptionValue'] = request.exceptionValue;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.outputField)) {
    query['outputField'] = request.outputField;
  }
  if (!Util.isUnset(request.outputType)) {
    query['outputType'] = request.outputType;
  }
  if (!Util.isUnset(request.params)) {
    query['params'] = request.params;
  }
  if (!Util.isUnset(request.paramsList)) {
    query['paramsList'] = request.paramsList;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sourceType)) {
    query['sourceType'] = request.sourceType;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BindVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 变量绑定操作
 *
 * @param request BindVariableRequest
 * @return BindVariableResponse
 */
async function bindVariable(request: BindVariableRequest): BindVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindVariableWithOptions(request, runtime);
}

model CheckCustVariableLimitRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  regId?: string(name='regId'),
}

model CheckCustVariableLimitResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CheckCustVariableLimitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckCustVariableLimitResponseBody(name='body'),
}

/**
 * @summary 校验累计变量数目是否超过限定值
 *
 * @param request CheckCustVariableLimitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckCustVariableLimitResponse
 */
async function checkCustVariableLimitWithOptions(request: CheckCustVariableLimitRequest, runtime: Util.RuntimeOptions): CheckCustVariableLimitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckCustVariableLimit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 校验累计变量数目是否超过限定值
 *
 * @param request CheckCustVariableLimitRequest
 * @return CheckCustVariableLimitResponse
 */
async function checkCustVariableLimit(request: CheckCustVariableLimitRequest): CheckCustVariableLimitResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkCustVariableLimitWithOptions(request, runtime);
}

model CheckExpressionVariableLimitRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model CheckExpressionVariableLimitResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CheckExpressionVariableLimitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckExpressionVariableLimitResponseBody(name='body'),
}

/**
 * @summary 校验创建变量是否超过上限
 *
 * @param request CheckExpressionVariableLimitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckExpressionVariableLimitResponse
 */
async function checkExpressionVariableLimitWithOptions(request: CheckExpressionVariableLimitRequest, runtime: Util.RuntimeOptions): CheckExpressionVariableLimitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckExpressionVariableLimit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 校验创建变量是否超过上限
 *
 * @param request CheckExpressionVariableLimitRequest
 * @return CheckExpressionVariableLimitResponse
 */
async function checkExpressionVariableLimit(request: CheckExpressionVariableLimitRequest): CheckExpressionVariableLimitResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkExpressionVariableLimitWithOptions(request, runtime);
}

model CheckFieldLimitRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  source?: string(name='source'),
}

model CheckFieldLimitResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model CheckFieldLimitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckFieldLimitResponseBody(name='body'),
}

/**
 * @summary 校验字段数目是否操过限定值
 *
 * @param request CheckFieldLimitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckFieldLimitResponse
 */
async function checkFieldLimitWithOptions(request: CheckFieldLimitRequest, runtime: Util.RuntimeOptions): CheckFieldLimitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckFieldLimit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 校验字段数目是否操过限定值
 *
 * @param request CheckFieldLimitRequest
 * @return CheckFieldLimitResponse
 */
async function checkFieldLimit(request: CheckFieldLimitRequest): CheckFieldLimitResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkFieldLimitWithOptions(request, runtime);
}

model CheckPermissionRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model CheckPermissionResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model CheckPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckPermissionResponseBody(name='body'),
}

/**
 * @summary 运营权限检查
 *
 * @param request CheckPermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckPermissionResponse
 */
async function checkPermissionWithOptions(request: CheckPermissionRequest, runtime: Util.RuntimeOptions): CheckPermissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckPermission',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 运营权限检查
 *
 * @param request CheckPermissionRequest
 * @return CheckPermissionResponse
 */
async function checkPermission(request: CheckPermissionRequest): CheckPermissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkPermissionWithOptions(request, runtime);
}

model CheckUsageVariableRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model CheckUsageVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CheckUsageVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckUsageVariableResponseBody(name='body'),
}

/**
 * @summary 校验变量引用
 *
 * @param request CheckUsageVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckUsageVariableResponse
 */
async function checkUsageVariableWithOptions(request: CheckUsageVariableRequest, runtime: Util.RuntimeOptions): CheckUsageVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckUsageVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 校验变量引用
 *
 * @param request CheckUsageVariableRequest
 * @return CheckUsageVariableResponse
 */
async function checkUsageVariable(request: CheckUsageVariableRequest): CheckUsageVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkUsageVariableWithOptions(request, runtime);
}

model ClearNameListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  variableId?: long(name='variableId', description='This parameter is required.'),
}

model ClearNameListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model ClearNameListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ClearNameListResponseBody(name='body'),
}

/**
 * @summary 清除名单
 *
 * @param request ClearNameListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ClearNameListResponse
 */
async function clearNameListWithOptions(request: ClearNameListRequest, runtime: Util.RuntimeOptions): ClearNameListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.variableId)) {
    query['variableId'] = request.variableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ClearNameList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 清除名单
 *
 * @param request ClearNameListRequest
 * @return ClearNameListResponse
 */
async function clearNameList(request: ClearNameListRequest): ClearNameListResponse {
  var runtime = new Util.RuntimeOptions{};
  return clearNameListWithOptions(request, runtime);
}

model CreateAnalysisConditionFavoriteRequest {
  lang?: string(name='Lang'),
  condition?: string(name='condition', description='This parameter is required.'),
  eventBeginTime?: long(name='eventBeginTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  eventEndTime?: long(name='eventEndTime', description='This parameter is required.'),
  fieldName?: string(name='fieldName'),
  fieldValue?: string(name='fieldValue'),
  name?: string(name='name', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  type?: string(name='type', description='This parameter is required.'),
}

model CreateAnalysisConditionFavoriteResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateAnalysisConditionFavoriteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAnalysisConditionFavoriteResponseBody(name='body'),
}

/**
 * @summary 新增查询条件
 *
 * @param request CreateAnalysisConditionFavoriteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAnalysisConditionFavoriteResponse
 */
async function createAnalysisConditionFavoriteWithOptions(request: CreateAnalysisConditionFavoriteRequest, runtime: Util.RuntimeOptions): CreateAnalysisConditionFavoriteResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.condition)) {
    query['condition'] = request.condition;
  }
  if (!Util.isUnset(request.eventBeginTime)) {
    query['eventBeginTime'] = request.eventBeginTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.eventEndTime)) {
    query['eventEndTime'] = request.eventEndTime;
  }
  if (!Util.isUnset(request.fieldName)) {
    query['fieldName'] = request.fieldName;
  }
  if (!Util.isUnset(request.fieldValue)) {
    query['fieldValue'] = request.fieldValue;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAnalysisConditionFavorite',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增查询条件
 *
 * @param request CreateAnalysisConditionFavoriteRequest
 * @return CreateAnalysisConditionFavoriteResponse
 */
async function createAnalysisConditionFavorite(request: CreateAnalysisConditionFavoriteRequest): CreateAnalysisConditionFavoriteResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAnalysisConditionFavoriteWithOptions(request, runtime);
}

model CreateAnalysisExportTaskRequest {
  lang?: string(name='Lang'),
  columns?: string(name='columns'),
  conditions?: string(name='conditions'),
  eventBeginTime?: long(name='eventBeginTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  eventEndTime?: long(name='eventEndTime', description='This parameter is required.'),
  fieldName?: string(name='fieldName'),
  fieldValue?: string(name='fieldValue'),
  fileFormat?: string(name='fileFormat', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  scope?: string(name='scope', description='This parameter is required.'),
  type?: string(name='type', description='This parameter is required.'),
}

model CreateAnalysisExportTaskResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    columns?: string(name='columns'),
    conditions?: string(name='conditions'),
    eventBeginTime?: long(name='eventBeginTime'),
    eventCodes?: string(name='eventCodes'),
    eventEndTime?: long(name='eventEndTime'),
    fileFormat?: string(name='fileFormat'),
    ossKey?: string(name='ossKey'),
    scope?: string(name='scope'),
    status?: string(name='status'),
    type?: string(name='type'),
    userId?: long(name='userId'),
  }(name='resultObject'),
}

model CreateAnalysisExportTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAnalysisExportTaskResponseBody(name='body'),
}

/**
 * @summary 新建导出任务
 *
 * @param request CreateAnalysisExportTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAnalysisExportTaskResponse
 */
async function createAnalysisExportTaskWithOptions(request: CreateAnalysisExportTaskRequest, runtime: Util.RuntimeOptions): CreateAnalysisExportTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.columns)) {
    query['columns'] = request.columns;
  }
  if (!Util.isUnset(request.conditions)) {
    query['conditions'] = request.conditions;
  }
  if (!Util.isUnset(request.eventBeginTime)) {
    query['eventBeginTime'] = request.eventBeginTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.eventEndTime)) {
    query['eventEndTime'] = request.eventEndTime;
  }
  if (!Util.isUnset(request.fieldName)) {
    query['fieldName'] = request.fieldName;
  }
  if (!Util.isUnset(request.fieldValue)) {
    query['fieldValue'] = request.fieldValue;
  }
  if (!Util.isUnset(request.fileFormat)) {
    query['fileFormat'] = request.fileFormat;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scope)) {
    query['scope'] = request.scope;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAnalysisExportTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新建导出任务
 *
 * @param request CreateAnalysisExportTaskRequest
 * @return CreateAnalysisExportTaskResponse
 */
async function createAnalysisExportTask(request: CreateAnalysisExportTaskRequest): CreateAnalysisExportTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAnalysisExportTaskWithOptions(request, runtime);
}

model CreateAppKeyRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model CreateAppKeyResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model CreateAppKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppKeyResponseBody(name='body'),
}

/**
 * @summary 创建appKey
 *
 * @param request CreateAppKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppKeyResponse
 */
async function createAppKeyWithOptions(request: CreateAppKeyRequest, runtime: Util.RuntimeOptions): CreateAppKeyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAppKey',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建appKey
 *
 * @param request CreateAppKeyRequest
 * @return CreateAppKeyResponse
 */
async function createAppKey(request: CreateAppKeyRequest): CreateAppKeyResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAppKeyWithOptions(request, runtime);
}

model CreateAuthorizationUserRequest {
  lang?: string(name='Lang'),
  bindId?: long(name='bindId'),
  createType?: string(name='createType'),
  eventTemplateId?: long(name='eventTemplateId'),
  regId?: string(name='regId'),
}

model CreateAuthorizationUserResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateAuthorizationUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAuthorizationUserResponseBody(name='body'),
}

/**
 * @summary 新增用户授权
 *
 * @param request CreateAuthorizationUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAuthorizationUserResponse
 */
async function createAuthorizationUserWithOptions(request: CreateAuthorizationUserRequest, runtime: Util.RuntimeOptions): CreateAuthorizationUserResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.bindId)) {
    query['bindId'] = request.bindId;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventTemplateId)) {
    query['eventTemplateId'] = request.eventTemplateId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAuthorizationUser',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增用户授权
 *
 * @param request CreateAuthorizationUserRequest
 * @return CreateAuthorizationUserResponse
 */
async function createAuthorizationUser(request: CreateAuthorizationUserRequest): CreateAuthorizationUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAuthorizationUserWithOptions(request, runtime);
}

model CreateCustVariableRequest {
  lang?: string(name='Lang'),
  condition?: string(name='condition'),
  createType?: string(name='createType'),
  description?: string(name='description'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  historyValueType?: string(name='historyValueType'),
  object?: string(name='object'),
  outputs?: string(name='outputs'),
  regId?: string(name='regId'),
  subject?: string(name='subject', description='This parameter is required.'),
  timeType?: string(name='timeType', description='This parameter is required.'),
  title?: string(name='title', description='This parameter is required.'),
  twCount?: int32(name='twCount'),
  velocityFC?: string(name='velocityFC', description='This parameter is required.'),
  velocityTW?: string(name='velocityTW', description='This parameter is required.'),
}

model CreateCustVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateCustVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateCustVariableResponseBody(name='body'),
}

/**
 * @summary 创建累计变量
 *
 * @param request CreateCustVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateCustVariableResponse
 */
async function createCustVariableWithOptions(request: CreateCustVariableRequest, runtime: Util.RuntimeOptions): CreateCustVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.condition)) {
    query['condition'] = request.condition;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.historyValueType)) {
    query['historyValueType'] = request.historyValueType;
  }
  if (!Util.isUnset(request.object)) {
    query['object'] = request.object;
  }
  if (!Util.isUnset(request.outputs)) {
    query['outputs'] = request.outputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.subject)) {
    query['subject'] = request.subject;
  }
  if (!Util.isUnset(request.timeType)) {
    query['timeType'] = request.timeType;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  if (!Util.isUnset(request.twCount)) {
    query['twCount'] = request.twCount;
  }
  if (!Util.isUnset(request.velocityFC)) {
    query['velocityFC'] = request.velocityFC;
  }
  if (!Util.isUnset(request.velocityTW)) {
    query['velocityTW'] = request.velocityTW;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateCustVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建累计变量
 *
 * @param request CreateCustVariableRequest
 * @return CreateCustVariableResponse
 */
async function createCustVariable(request: CreateCustVariableRequest): CreateCustVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCustVariableWithOptions(request, runtime);
}

model CreateDataSourceRequest {
  lang?: string(name='Lang'),
  description?: string(name='description'),
  name?: string(name='name', description='This parameter is required.'),
  ossKey?: string(name='ossKey', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  type?: string(name='type', description='This parameter is required.'),
}

model CreateDataSourceResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateDataSourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDataSourceResponseBody(name='body'),
}

/**
 * @summary 新增数据源
 *
 * @param request CreateDataSourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDataSourceResponse
 */
async function createDataSourceWithOptions(request: CreateDataSourceRequest, runtime: Util.RuntimeOptions): CreateDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.ossKey)) {
    query['ossKey'] = request.ossKey;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateDataSource',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增数据源
 *
 * @param request CreateDataSourceRequest
 * @return CreateDataSourceResponse
 */
async function createDataSource(request: CreateDataSourceRequest): CreateDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDataSourceWithOptions(request, runtime);
}

model CreateEventRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventName?: string(name='eventName'),
  inputFieldsStr?: string(name='inputFieldsStr'),
  memo?: string(name='memo'),
  regId?: string(name='regId'),
  templateCode?: string(name='templateCode'),
  templateName?: string(name='templateName'),
  templateType?: string(name='templateType'),
}

model CreateEventResponseBody = {
  data?: boolean(name='data'),
  requestId?: string(name='requestId'),
}

model CreateEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateEventResponseBody(name='body'),
}

/**
 * @summary 创建事件
 *
 * @param request CreateEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateEventResponse
 */
async function createEventWithOptions(request: CreateEventRequest, runtime: Util.RuntimeOptions): CreateEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventName)) {
    query['eventName'] = request.eventName;
  }
  if (!Util.isUnset(request.inputFieldsStr)) {
    query['inputFieldsStr'] = request.inputFieldsStr;
  }
  if (!Util.isUnset(request.memo)) {
    query['memo'] = request.memo;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateCode)) {
    query['templateCode'] = request.templateCode;
  }
  if (!Util.isUnset(request.templateName)) {
    query['templateName'] = request.templateName;
  }
  if (!Util.isUnset(request.templateType)) {
    query['templateType'] = request.templateType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建事件
 *
 * @param request CreateEventRequest
 * @return CreateEventResponse
 */
async function createEvent(request: CreateEventRequest): CreateEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return createEventWithOptions(request, runtime);
}

model CreateExpressionVariableRequest {
  lang?: string(name='Lang'),
  description?: string(name='description'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  expression?: string(name='expression', description='This parameter is required.'),
  expressionTitle?: string(name='expressionTitle', description='This parameter is required.'),
  expressionVariable?: string(name='expressionVariable'),
  outlier?: string(name='outlier', description='This parameter is required.'),
  outputs?: string(name='outputs', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  title?: string(name='title', description='This parameter is required.'),
}

model CreateExpressionVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateExpressionVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateExpressionVariableResponseBody(name='body'),
}

/**
 * @summary 创建自定义变量
 *
 * @param request CreateExpressionVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateExpressionVariableResponse
 */
async function createExpressionVariableWithOptions(request: CreateExpressionVariableRequest, runtime: Util.RuntimeOptions): CreateExpressionVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.expression)) {
    query['expression'] = request.expression;
  }
  if (!Util.isUnset(request.expressionTitle)) {
    query['expressionTitle'] = request.expressionTitle;
  }
  if (!Util.isUnset(request.expressionVariable)) {
    query['expressionVariable'] = request.expressionVariable;
  }
  if (!Util.isUnset(request.outlier)) {
    query['outlier'] = request.outlier;
  }
  if (!Util.isUnset(request.outputs)) {
    query['outputs'] = request.outputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateExpressionVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建自定义变量
 *
 * @param request CreateExpressionVariableRequest
 * @return CreateExpressionVariableResponse
 */
async function createExpressionVariable(request: CreateExpressionVariableRequest): CreateExpressionVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return createExpressionVariableWithOptions(request, runtime);
}

model CreateFieldRequest {
  lang?: string(name='Lang'),
  classify?: string(name='classify'),
  description?: string(name='description'),
  enumData?: string(name='enumData'),
  name?: string(name='name'),
  regId?: string(name='regId', description='This parameter is required.'),
  source?: string(name='source'),
  title?: string(name='title'),
  type?: string(name='type'),
}

model CreateFieldResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateFieldResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFieldResponseBody(name='body'),
}

/**
 * @summary 新增字段
 *
 * @param request CreateFieldRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFieldResponse
 */
async function createFieldWithOptions(request: CreateFieldRequest, runtime: Util.RuntimeOptions): CreateFieldResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.classify)) {
    query['classify'] = request.classify;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.enumData)) {
    query['enumData'] = request.enumData;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateField',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增字段
 *
 * @param request CreateFieldRequest
 * @return CreateFieldResponse
 */
async function createField(request: CreateFieldRequest): CreateFieldResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFieldWithOptions(request, runtime);
}

model CreateGroupSignRequest {
  lang?: string(name='Lang'),
  signList?: string(name='SignList', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model CreateGroupSignResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model CreateGroupSignResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateGroupSignResponseBody(name='body'),
}

/**
 * @summary 社群打标
 *
 * @param request CreateGroupSignRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateGroupSignResponse
 */
async function createGroupSignWithOptions(request: CreateGroupSignRequest, runtime: Util.RuntimeOptions): CreateGroupSignResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.signList)) {
    query['SignList'] = request.signList;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateGroupSign',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 社群打标
 *
 * @param request CreateGroupSignRequest
 * @return CreateGroupSignResponse
 */
async function createGroupSign(request: CreateGroupSignRequest): CreateGroupSignResponse {
  var runtime = new Util.RuntimeOptions{};
  return createGroupSignWithOptions(request, runtime);
}

model CreateMonitorTaskRequest {
  lang?: string(name='Lang'),
  bizType?: string(name='bizType', description='This parameter is required.'),
  cycleType?: string(name='cycleType', description='This parameter is required.'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  filePath?: string(name='filePath', description='This parameter is required.'),
  listdayStr?: string(name='listdayStr'),
  regId?: string(name='regId'),
  startTime?: long(name='startTime', description='This parameter is required.'),
}

model CreateMonitorTaskResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateMonitorTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateMonitorTaskResponseBody(name='body'),
}

/**
 * @summary 创建监控任务
 *
 * @param request CreateMonitorTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateMonitorTaskResponse
 */
async function createMonitorTaskWithOptions(request: CreateMonitorTaskRequest, runtime: Util.RuntimeOptions): CreateMonitorTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.bizType)) {
    query['bizType'] = request.bizType;
  }
  if (!Util.isUnset(request.cycleType)) {
    query['cycleType'] = request.cycleType;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.filePath)) {
    query['filePath'] = request.filePath;
  }
  if (!Util.isUnset(request.listdayStr)) {
    query['listdayStr'] = request.listdayStr;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['startTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateMonitorTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建监控任务
 *
 * @param request CreateMonitorTaskRequest
 * @return CreateMonitorTaskResponse
 */
async function createMonitorTask(request: CreateMonitorTaskRequest): CreateMonitorTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMonitorTaskWithOptions(request, runtime);
}

model CreatePocRequest {
  lang?: string(name='Lang'),
  configStr?: string(name='configStr'),
  fileName?: string(name='fileName'),
  fileType?: string(name='fileType'),
  fileUrl?: string(name='fileUrl'),
  regId?: string(name='regId'),
  serviceCode?: string(name='serviceCode'),
  serviceName?: string(name='serviceName'),
  taskName?: string(name='taskName'),
}

model CreatePocResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreatePocResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePocResponseBody(name='body'),
}

/**
 * @summary 创建poc
 *
 * @param request CreatePocRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePocResponse
 */
async function createPocWithOptions(request: CreatePocRequest, runtime: Util.RuntimeOptions): CreatePocResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.configStr)) {
    query['configStr'] = request.configStr;
  }
  if (!Util.isUnset(request.fileName)) {
    query['fileName'] = request.fileName;
  }
  if (!Util.isUnset(request.fileType)) {
    query['fileType'] = request.fileType;
  }
  if (!Util.isUnset(request.fileUrl)) {
    query['fileUrl'] = request.fileUrl;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['serviceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.serviceName)) {
    query['serviceName'] = request.serviceName;
  }
  if (!Util.isUnset(request.taskName)) {
    query['taskName'] = request.taskName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreatePoc',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建poc
 *
 * @param request CreatePocRequest
 * @return CreatePocResponse
 */
async function createPoc(request: CreatePocRequest): CreatePocResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPocWithOptions(request, runtime);
}

model CreatePocEvRequest {
  dateFormat?: string(name='DateFormat'),
  fileName?: string(name='FileName'),
  fileType?: string(name='FileType'),
  fileUrl?: string(name='FileUrl'),
  lang?: string(name='Lang'),
  regId?: string(name='RegId'),
  serviceCode?: string(name='ServiceCode'),
  serviceName?: string(name='ServiceName'),
  tab?: string(name='Tab'),
  taskName?: string(name='TaskName'),
  type?: string(name='Type'),
}

model CreatePocEvResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: string(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  resultObject?: string(name='ResultObject'),
}

model CreatePocEvResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePocEvResponseBody(name='body'),
}

/**
 * @summary 创建poc
 *
 * @param request CreatePocEvRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePocEvResponse
 */
async function createPocEvWithOptions(request: CreatePocEvRequest, runtime: Util.RuntimeOptions): CreatePocEvResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dateFormat)) {
    query['DateFormat'] = request.dateFormat;
  }
  if (!Util.isUnset(request.fileName)) {
    query['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.fileType)) {
    query['FileType'] = request.fileType;
  }
  if (!Util.isUnset(request.fileUrl)) {
    query['FileUrl'] = request.fileUrl;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['RegId'] = request.regId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.serviceName)) {
    query['ServiceName'] = request.serviceName;
  }
  if (!Util.isUnset(request.tab)) {
    query['Tab'] = request.tab;
  }
  if (!Util.isUnset(request.taskName)) {
    query['TaskName'] = request.taskName;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreatePocEv',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建poc
 *
 * @param request CreatePocEvRequest
 * @return CreatePocEvResponse
 */
async function createPocEv(request: CreatePocEvRequest): CreatePocEvResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPocEvWithOptions(request, runtime);
}

model CreateQueryVariableRequest {
  lang?: string(name='Lang'),
  dataSourceCode?: string(name='dataSourceCode', description='This parameter is required.'),
  description?: string(name='description'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  expression?: string(name='expression', description='This parameter is required.'),
  expressionTitle?: string(name='expressionTitle', description='This parameter is required.'),
  expressionVariable?: string(name='expressionVariable', description='This parameter is required.'),
  outlier?: string(name='outlier', description='This parameter is required.'),
  outputs?: string(name='outputs', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  title?: string(name='title', description='This parameter is required.'),
}

model CreateQueryVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateQueryVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateQueryVariableResponseBody(name='body'),
}

/**
 * @summary 自定义查询变量新增
 *
 * @param request CreateQueryVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateQueryVariableResponse
 */
async function createQueryVariableWithOptions(request: CreateQueryVariableRequest, runtime: Util.RuntimeOptions): CreateQueryVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataSourceCode)) {
    query['dataSourceCode'] = request.dataSourceCode;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.expression)) {
    query['expression'] = request.expression;
  }
  if (!Util.isUnset(request.expressionTitle)) {
    query['expressionTitle'] = request.expressionTitle;
  }
  if (!Util.isUnset(request.expressionVariable)) {
    query['expressionVariable'] = request.expressionVariable;
  }
  if (!Util.isUnset(request.outlier)) {
    query['outlier'] = request.outlier;
  }
  if (!Util.isUnset(request.outputs)) {
    query['outputs'] = request.outputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateQueryVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 自定义查询变量新增
 *
 * @param request CreateQueryVariableRequest
 * @return CreateQueryVariableResponse
 */
async function createQueryVariable(request: CreateQueryVariableRequest): CreateQueryVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return createQueryVariableWithOptions(request, runtime);
}

model CreateRecommendEventRuleRequest {
  lang?: string(name='Lang'),
  eventCode?: string(name='eventCode'),
  eventName?: string(name='eventName'),
  recommendRuleIdsStr?: string(name='recommendRuleIdsStr'),
  regId?: string(name='regId'),
  taskId?: long(name='taskId'),
}

model CreateRecommendEventRuleResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateRecommendEventRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRecommendEventRuleResponseBody(name='body'),
}

/**
 * @summary 创建推荐事件策略
 *
 * @param request CreateRecommendEventRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRecommendEventRuleResponse
 */
async function createRecommendEventRuleWithOptions(request: CreateRecommendEventRuleRequest, runtime: Util.RuntimeOptions): CreateRecommendEventRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.eventName)) {
    query['eventName'] = request.eventName;
  }
  if (!Util.isUnset(request.recommendRuleIdsStr)) {
    query['recommendRuleIdsStr'] = request.recommendRuleIdsStr;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['taskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateRecommendEventRule',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建推荐事件策略
 *
 * @param request CreateRecommendEventRuleRequest
 * @return CreateRecommendEventRuleResponse
 */
async function createRecommendEventRule(request: CreateRecommendEventRuleRequest): CreateRecommendEventRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRecommendEventRuleWithOptions(request, runtime);
}

model CreateRecommendTaskRequest {
  lang?: string(name='Lang'),
  name?: string(name='name', description='This parameter is required.'),
  regId?: string(name='regId'),
  sampleId?: long(name='sampleId', description='This parameter is required.'),
  variablesStr?: string(name='variablesStr', description='This parameter is required.'),
  velocitiesStr?: string(name='velocitiesStr', description='This parameter is required.'),
}

model CreateRecommendTaskResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateRecommendTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRecommendTaskResponseBody(name='body'),
}

/**
 * @summary 创建推荐任务
 *
 * @param request CreateRecommendTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRecommendTaskResponse
 */
async function createRecommendTaskWithOptions(request: CreateRecommendTaskRequest, runtime: Util.RuntimeOptions): CreateRecommendTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sampleId)) {
    query['sampleId'] = request.sampleId;
  }
  if (!Util.isUnset(request.variablesStr)) {
    query['variablesStr'] = request.variablesStr;
  }
  if (!Util.isUnset(request.velocitiesStr)) {
    query['velocitiesStr'] = request.velocitiesStr;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateRecommendTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建推荐任务
 *
 * @param request CreateRecommendTaskRequest
 * @return CreateRecommendTaskResponse
 */
async function createRecommendTask(request: CreateRecommendTaskRequest): CreateRecommendTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRecommendTaskWithOptions(request, runtime);
}

model CreateReplenishTaskRequest {
  clientFileName?: string(name='ClientFileName', description='This parameter is required.'),
  clientPath?: string(name='ClientPath', description='This parameter is required.'),
  lang?: string(name='Lang'),
  taskId?: string(name='TaskId', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model CreateReplenishTaskResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model CreateReplenishTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateReplenishTaskResponseBody(name='body'),
}

/**
 * @summary 补充上传
 *
 * @param request CreateReplenishTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateReplenishTaskResponse
 */
async function createReplenishTaskWithOptions(request: CreateReplenishTaskRequest, runtime: Util.RuntimeOptions): CreateReplenishTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientFileName)) {
    query['ClientFileName'] = request.clientFileName;
  }
  if (!Util.isUnset(request.clientPath)) {
    query['ClientPath'] = request.clientPath;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateReplenishTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 补充上传
 *
 * @param request CreateReplenishTaskRequest
 * @return CreateReplenishTaskResponse
 */
async function createReplenishTask(request: CreateReplenishTaskRequest): CreateReplenishTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createReplenishTaskWithOptions(request, runtime);
}

model CreateRuleRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  eventName?: string(name='eventName'),
  logicExpression?: string(name='logicExpression'),
  memo?: string(name='memo'),
  regId?: string(name='regId'),
  ruleActions?: string(name='ruleActions'),
  ruleExpressions?: string(name='ruleExpressions'),
  ruleName?: string(name='ruleName'),
  ruleStatus?: string(name='ruleStatus'),
}

model CreateRuleResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRuleResponseBody(name='body'),
}

/**
 * @summary 创建策略&版本
 *
 * @param request CreateRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRuleResponse
 */
async function createRuleWithOptions(request: CreateRuleRequest, runtime: Util.RuntimeOptions): CreateRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.eventName)) {
    query['eventName'] = request.eventName;
  }
  if (!Util.isUnset(request.logicExpression)) {
    query['logicExpression'] = request.logicExpression;
  }
  if (!Util.isUnset(request.memo)) {
    query['memo'] = request.memo;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleActions)) {
    query['ruleActions'] = request.ruleActions;
  }
  if (!Util.isUnset(request.ruleExpressions)) {
    query['ruleExpressions'] = request.ruleExpressions;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.ruleStatus)) {
    query['ruleStatus'] = request.ruleStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateRule',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建策略&版本
 *
 * @param request CreateRuleRequest
 * @return CreateRuleResponse
 */
async function createRule(request: CreateRuleRequest): CreateRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRuleWithOptions(request, runtime);
}

model CreateSampleRequest {
  lang?: string(name='Lang'),
  clientFileName?: string(name='clientFileName'),
  clientPath?: string(name='clientPath'),
  fileType?: string(name='fileType'),
  regId?: string(name='regId'),
  sampleTag?: string(name='sampleTag'),
  sampleType?: string(name='sampleType'),
  sampleValues?: string(name='sampleValues'),
  uploadType?: string(name='uploadType'),
}

model CreateSampleResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    communityCount?: int32(name='communityCount'),
    failCount?: int32(name='failCount'),
    recallProbability?: string(name='recallProbability'),
    riskDensity?: string(name='riskDensity'),
    sampleCount?: int32(name='sampleCount'),
    successCount?: int32(name='successCount'),
  }(name='resultObject'),
}

model CreateSampleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSampleResponseBody(name='body'),
}

/**
 * @summary 添加样本
 *
 * @param request CreateSampleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSampleResponse
 */
async function createSampleWithOptions(request: CreateSampleRequest, runtime: Util.RuntimeOptions): CreateSampleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.clientFileName)) {
    query['clientFileName'] = request.clientFileName;
  }
  if (!Util.isUnset(request.clientPath)) {
    query['clientPath'] = request.clientPath;
  }
  if (!Util.isUnset(request.fileType)) {
    query['fileType'] = request.fileType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sampleTag)) {
    query['sampleTag'] = request.sampleTag;
  }
  if (!Util.isUnset(request.sampleType)) {
    query['sampleType'] = request.sampleType;
  }
  if (!Util.isUnset(request.sampleValues)) {
    query['sampleValues'] = request.sampleValues;
  }
  if (!Util.isUnset(request.uploadType)) {
    query['uploadType'] = request.uploadType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateSample',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 添加样本
 *
 * @param request CreateSampleRequest
 * @return CreateSampleResponse
 */
async function createSample(request: CreateSampleRequest): CreateSampleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSampleWithOptions(request, runtime);
}

model CreateSampleApiRequest {
  dataType?: string(name='DataType', example='ip/accountID'),
  dataValue?: string(name='DataValue'),
  lang?: string(name='Lang', example='zh'),
  regId?: string(name='RegId', description='regionId', example='cn-shanghai'),
  sampleBatchType?: string(name='SampleBatchType'),
  serviceList?: string(name='ServiceList'),
}

model CreateSampleApiResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', description='Id of the request', example='A32FE941-35F2-5378-B37C-4B8FDB16F094'),
}

model CreateSampleApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSampleApiResponseBody(name='body'),
}

/**
 * @summary 用户级别单API创建样本批
 *
 * @param request CreateSampleApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSampleApiResponse
 */
async function createSampleApiWithOptions(request: CreateSampleApiRequest, runtime: Util.RuntimeOptions): CreateSampleApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataType)) {
    query['DataType'] = request.dataType;
  }
  if (!Util.isUnset(request.dataValue)) {
    query['DataValue'] = request.dataValue;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['RegId'] = request.regId;
  }
  if (!Util.isUnset(request.sampleBatchType)) {
    query['SampleBatchType'] = request.sampleBatchType;
  }
  if (!Util.isUnset(request.serviceList)) {
    query['ServiceList'] = request.serviceList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateSampleApi',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 用户级别单API创建样本批
 *
 * @param request CreateSampleApiRequest
 * @return CreateSampleApiResponse
 */
async function createSampleApi(request: CreateSampleApiRequest): CreateSampleApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSampleApiWithOptions(request, runtime);
}

model CreateSampleDataRequest {
  lang?: string(name='Lang'),
  description?: string(name='description'),
  encryptType?: string(name='encryptType'),
  name?: string(name='name'),
  regId?: string(name='regId'),
  riskValue?: string(name='riskValue'),
  scene?: string(name='scene'),
  storePath?: string(name='storePath'),
  storeType?: string(name='storeType'),
}

model CreateSampleDataResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateSampleDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSampleDataResponseBody(name='body'),
}

/**
 * @summary 创建样本数据
 *
 * @param request CreateSampleDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSampleDataResponse
 */
async function createSampleDataWithOptions(request: CreateSampleDataRequest, runtime: Util.RuntimeOptions): CreateSampleDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.encryptType)) {
    query['encryptType'] = request.encryptType;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.riskValue)) {
    query['riskValue'] = request.riskValue;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  if (!Util.isUnset(request.storePath)) {
    query['storePath'] = request.storePath;
  }
  if (!Util.isUnset(request.storeType)) {
    query['storeType'] = request.storeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateSampleData',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建样本数据
 *
 * @param request CreateSampleDataRequest
 * @return CreateSampleDataResponse
 */
async function createSampleData(request: CreateSampleDataRequest): CreateSampleDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSampleDataWithOptions(request, runtime);
}

model CreateSimulationTaskRequest {
  lang?: string(name='Lang'),
  dataSourceConfig?: string(name='dataSourceConfig'),
  dataSourceType?: string(name='dataSourceType'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  filtersStr?: string(name='filtersStr'),
  regId?: string(name='regId'),
  rulesStr?: string(name='rulesStr', description='This parameter is required.'),
  runTask?: boolean(name='runTask', description='This parameter is required.'),
  startTime?: long(name='startTime', description='This parameter is required.'),
  taskName?: string(name='taskName', description='This parameter is required.'),
}

model CreateSimulationTaskResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateSimulationTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSimulationTaskResponseBody(name='body'),
}

/**
 * @summary 创建任务
 *
 * @param request CreateSimulationTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSimulationTaskResponse
 */
async function createSimulationTaskWithOptions(request: CreateSimulationTaskRequest, runtime: Util.RuntimeOptions): CreateSimulationTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataSourceConfig)) {
    query['dataSourceConfig'] = request.dataSourceConfig;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    query['dataSourceType'] = request.dataSourceType;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.filtersStr)) {
    query['filtersStr'] = request.filtersStr;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.rulesStr)) {
    query['rulesStr'] = request.rulesStr;
  }
  if (!Util.isUnset(request.runTask)) {
    query['runTask'] = request.runTask;
  }
  if (!Util.isUnset(request.startTime)) {
    query['startTime'] = request.startTime;
  }
  if (!Util.isUnset(request.taskName)) {
    query['taskName'] = request.taskName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateSimulationTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建任务
 *
 * @param request CreateSimulationTaskRequest
 * @return CreateSimulationTaskResponse
 */
async function createSimulationTask(request: CreateSimulationTaskRequest): CreateSimulationTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSimulationTaskWithOptions(request, runtime);
}

model CreateTaskRequest {
  clientFileName?: string(name='ClientFileName'),
  clientPath?: string(name='ClientPath'),
  describe?: string(name='Describe'),
  lang?: string(name='Lang'),
  sceneName?: string(name='SceneName'),
  regId?: string(name='regId'),
}

model CreateTaskResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model CreateTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTaskResponseBody(name='body'),
}

/**
 * @summary 创建任务
 *
 * @param request CreateTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTaskResponse
 */
async function createTaskWithOptions(request: CreateTaskRequest, runtime: Util.RuntimeOptions): CreateTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientFileName)) {
    query['ClientFileName'] = request.clientFileName;
  }
  if (!Util.isUnset(request.clientPath)) {
    query['ClientPath'] = request.clientPath;
  }
  if (!Util.isUnset(request.describe)) {
    query['Describe'] = request.describe;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.sceneName)) {
    query['SceneName'] = request.sceneName;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建任务
 *
 * @param request CreateTaskRequest
 * @return CreateTaskResponse
 */
async function createTask(request: CreateTaskRequest): CreateTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTaskWithOptions(request, runtime);
}

model CreateTemplateRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  eventName?: string(name='eventName'),
  logicExpression?: string(name='logicExpression'),
  memo?: string(name='memo'),
  regId?: string(name='regId'),
  ruleActions?: string(name='ruleActions'),
  ruleExpressions?: string(name='ruleExpressions'),
  ruleName?: string(name='ruleName'),
  ruleStatus?: string(name='ruleStatus'),
}

model CreateTemplateResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model CreateTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTemplateResponseBody(name='body'),
}

/**
 * @summary 创建模版
 *
 * @param request CreateTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTemplateResponse
 */
async function createTemplateWithOptions(request: CreateTemplateRequest, runtime: Util.RuntimeOptions): CreateTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.eventName)) {
    query['eventName'] = request.eventName;
  }
  if (!Util.isUnset(request.logicExpression)) {
    query['logicExpression'] = request.logicExpression;
  }
  if (!Util.isUnset(request.memo)) {
    query['memo'] = request.memo;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleActions)) {
    query['ruleActions'] = request.ruleActions;
  }
  if (!Util.isUnset(request.ruleExpressions)) {
    query['ruleExpressions'] = request.ruleExpressions;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.ruleStatus)) {
    query['ruleStatus'] = request.ruleStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTemplate',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建模版
 *
 * @param request CreateTemplateRequest
 * @return CreateTemplateResponse
 */
async function createTemplate(request: CreateTemplateRequest): CreateTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTemplateWithOptions(request, runtime);
}

model DeleteAnalysisConditionFavoriteRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DeleteAnalysisConditionFavoriteResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteAnalysisConditionFavoriteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAnalysisConditionFavoriteResponseBody(name='body'),
}

/**
 * @summary 删除查询条件
 *
 * @param request DeleteAnalysisConditionFavoriteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAnalysisConditionFavoriteResponse
 */
async function deleteAnalysisConditionFavoriteWithOptions(request: DeleteAnalysisConditionFavoriteRequest, runtime: Util.RuntimeOptions): DeleteAnalysisConditionFavoriteResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAnalysisConditionFavorite',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除查询条件
 *
 * @param request DeleteAnalysisConditionFavoriteRequest
 * @return DeleteAnalysisConditionFavoriteResponse
 */
async function deleteAnalysisConditionFavorite(request: DeleteAnalysisConditionFavoriteRequest): DeleteAnalysisConditionFavoriteResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAnalysisConditionFavoriteWithOptions(request, runtime);
}

model DeleteAuthUserRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  id?: long(name='id'),
  regId?: string(name='regId'),
}

model DeleteAuthUserResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteAuthUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAuthUserResponseBody(name='body'),
}

/**
 * @summary 删除用户授权
 *
 * @param request DeleteAuthUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAuthUserResponse
 */
async function deleteAuthUserWithOptions(request: DeleteAuthUserRequest, runtime: Util.RuntimeOptions): DeleteAuthUserResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAuthUser',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除用户授权
 *
 * @param request DeleteAuthUserRequest
 * @return DeleteAuthUserResponse
 */
async function deleteAuthUser(request: DeleteAuthUserRequest): DeleteAuthUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAuthUserWithOptions(request, runtime);
}

model DeleteByPassShuntEventRequest {
  lang?: string(name='Lang'),
  eventId?: long(name='eventId'),
  regId?: string(name='regId'),
}

model DeleteByPassShuntEventResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model DeleteByPassShuntEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteByPassShuntEventResponseBody(name='body'),
}

/**
 * @summary 删除旁路事件
 *
 * @param request DeleteByPassShuntEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteByPassShuntEventResponse
 */
async function deleteByPassShuntEventWithOptions(request: DeleteByPassShuntEventRequest, runtime: Util.RuntimeOptions): DeleteByPassShuntEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventId)) {
    query['eventId'] = request.eventId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteByPassShuntEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除旁路事件
 *
 * @param request DeleteByPassShuntEventRequest
 * @return DeleteByPassShuntEventResponse
 */
async function deleteByPassShuntEvent(request: DeleteByPassShuntEventRequest): DeleteByPassShuntEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteByPassShuntEventWithOptions(request, runtime);
}

model DeleteCustVariableRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  dataVersion?: long(name='dataVersion'),
  regId?: string(name='regId'),
  variableId?: string(name='variableId'),
}

model DeleteCustVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteCustVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteCustVariableResponseBody(name='body'),
}

/**
 * @summary 删除累计变量
 *
 * @param request DeleteCustVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteCustVariableResponse
 */
async function deleteCustVariableWithOptions(request: DeleteCustVariableRequest, runtime: Util.RuntimeOptions): DeleteCustVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.dataVersion)) {
    query['dataVersion'] = request.dataVersion;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.variableId)) {
    query['variableId'] = request.variableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCustVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除累计变量
 *
 * @param request DeleteCustVariableRequest
 * @return DeleteCustVariableResponse
 */
async function deleteCustVariable(request: DeleteCustVariableRequest): DeleteCustVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCustVariableWithOptions(request, runtime);
}

model DeleteDataSourceRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DeleteDataSourceResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteDataSourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDataSourceResponseBody(name='body'),
}

/**
 * @summary 删除数据源
 *
 * @param request DeleteDataSourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDataSourceResponse
 */
async function deleteDataSourceWithOptions(request: DeleteDataSourceRequest, runtime: Util.RuntimeOptions): DeleteDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDataSource',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除数据源
 *
 * @param request DeleteDataSourceRequest
 * @return DeleteDataSourceResponse
 */
async function deleteDataSource(request: DeleteDataSourceRequest): DeleteDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDataSourceWithOptions(request, runtime);
}

model DeleteExpressionVariableRequest {
  lang?: string(name='Lang'),
  dataVersion?: long(name='dataVersion', description='This parameter is required.'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DeleteExpressionVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteExpressionVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteExpressionVariableResponseBody(name='body'),
}

/**
 * @summary 删除自定义变量
 *
 * @param request DeleteExpressionVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteExpressionVariableResponse
 */
async function deleteExpressionVariableWithOptions(request: DeleteExpressionVariableRequest, runtime: Util.RuntimeOptions): DeleteExpressionVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataVersion)) {
    query['dataVersion'] = request.dataVersion;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteExpressionVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除自定义变量
 *
 * @param request DeleteExpressionVariableRequest
 * @return DeleteExpressionVariableResponse
 */
async function deleteExpressionVariable(request: DeleteExpressionVariableRequest): DeleteExpressionVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteExpressionVariableWithOptions(request, runtime);
}

model DeleteFieldRequest {
  lang?: string(name='Lang'),
  id?: long(name='id'),
  name?: string(name='name'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DeleteFieldResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteFieldResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteFieldResponseBody(name='body'),
}

/**
 * @summary 删除字段
 *
 * @param request DeleteFieldRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteFieldResponse
 */
async function deleteFieldWithOptions(request: DeleteFieldRequest, runtime: Util.RuntimeOptions): DeleteFieldResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteField',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除字段
 *
 * @param request DeleteFieldRequest
 * @return DeleteFieldResponse
 */
async function deleteField(request: DeleteFieldRequest): DeleteFieldResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFieldWithOptions(request, runtime);
}

model DeleteNameListRequest {
  lang?: string(name='Lang'),
  ids?: string(name='ids'),
  regId?: string(name='regId'),
}

model DeleteNameListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteNameListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteNameListResponseBody(name='body'),
}

/**
 * @summary 删除名单
 *
 * @param request DeleteNameListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteNameListResponse
 */
async function deleteNameListWithOptions(request: DeleteNameListRequest, runtime: Util.RuntimeOptions): DeleteNameListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.ids)) {
    query['ids'] = request.ids;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteNameList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除名单
 *
 * @param request DeleteNameListRequest
 * @return DeleteNameListResponse
 */
async function deleteNameList(request: DeleteNameListRequest): DeleteNameListResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteNameListWithOptions(request, runtime);
}

model DeleteNameListDataRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  variableId?: string(name='variableId'),
}

model DeleteNameListDataResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteNameListDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteNameListDataResponseBody(name='body'),
}

/**
 * @summary 删除(伪)名单变量数据
 *
 * @param request DeleteNameListDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteNameListDataResponse
 */
async function deleteNameListDataWithOptions(request: DeleteNameListDataRequest, runtime: Util.RuntimeOptions): DeleteNameListDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.variableId)) {
    query['variableId'] = request.variableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteNameListData',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除(伪)名单变量数据
 *
 * @param request DeleteNameListDataRequest
 * @return DeleteNameListDataResponse
 */
async function deleteNameListData(request: DeleteNameListDataRequest): DeleteNameListDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteNameListDataWithOptions(request, runtime);
}

model DeleteQueryVariableRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DeleteQueryVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteQueryVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteQueryVariableResponseBody(name='body'),
}

/**
 * @summary 查询变量删除
 *
 * @param request DeleteQueryVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteQueryVariableResponse
 */
async function deleteQueryVariableWithOptions(request: DeleteQueryVariableRequest, runtime: Util.RuntimeOptions): DeleteQueryVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteQueryVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量删除
 *
 * @param request DeleteQueryVariableRequest
 * @return DeleteQueryVariableResponse
 */
async function deleteQueryVariable(request: DeleteQueryVariableRequest): DeleteQueryVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteQueryVariableWithOptions(request, runtime);
}

model DeleteRuleRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  regId?: string(name='regId'),
  ruleId?: string(name='ruleId'),
  ruleVersionId?: long(name='ruleVersionId'),
}

model DeleteRuleResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRuleResponseBody(name='body'),
}

/**
 * @summary 删除策略版本
 *
 * @param request DeleteRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRuleResponse
 */
async function deleteRuleWithOptions(request: DeleteRuleRequest, runtime: Util.RuntimeOptions): DeleteRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleVersionId)) {
    query['ruleVersionId'] = request.ruleVersionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteRule',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除策略版本
 *
 * @param request DeleteRuleRequest
 * @return DeleteRuleResponse
 */
async function deleteRule(request: DeleteRuleRequest): DeleteRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteRuleWithOptions(request, runtime);
}

model DeleteSampleBatchRequest {
  lang?: string(name='Lang'),
  ids?: string(name='ids'),
  regId?: string(name='regId'),
  versions?: string(name='versions', description='This parameter is required.'),
}

model DeleteSampleBatchResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model DeleteSampleBatchResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteSampleBatchResponseBody(name='body'),
}

/**
 * @summary 批量删除样本
 *
 * @param request DeleteSampleBatchRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteSampleBatchResponse
 */
async function deleteSampleBatchWithOptions(request: DeleteSampleBatchRequest, runtime: Util.RuntimeOptions): DeleteSampleBatchResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.ids)) {
    query['ids'] = request.ids;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.versions)) {
    query['versions'] = request.versions;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSampleBatch',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量删除样本
 *
 * @param request DeleteSampleBatchRequest
 * @return DeleteSampleBatchResponse
 */
async function deleteSampleBatch(request: DeleteSampleBatchRequest): DeleteSampleBatchResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSampleBatchWithOptions(request, runtime);
}

model DeleteSampleDataRequest {
  lang?: string(name='Lang'),
  id?: string(name='id'),
  regId?: string(name='regId'),
}

model DeleteSampleDataResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DeleteSampleDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteSampleDataResponseBody(name='body'),
}

/**
 * @summary 删除样本数据
 *
 * @param request DeleteSampleDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteSampleDataResponse
 */
async function deleteSampleDataWithOptions(request: DeleteSampleDataRequest, runtime: Util.RuntimeOptions): DeleteSampleDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSampleData',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除样本数据
 *
 * @param request DeleteSampleDataRequest
 * @return DeleteSampleDataResponse
 */
async function deleteSampleData(request: DeleteSampleDataRequest): DeleteSampleDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSampleDataWithOptions(request, runtime);
}

model DeleteTaskRequest {
  lang?: string(name='Lang'),
  taskId?: string(name='TaskId'),
  regId?: string(name='regId'),
}

model DeleteTaskResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model DeleteTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteTaskResponseBody(name='body'),
}

/**
 * @summary 删除社群任务
 *
 * @param request DeleteTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTaskResponse
 */
async function deleteTaskWithOptions(request: DeleteTaskRequest, runtime: Util.RuntimeOptions): DeleteTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除社群任务
 *
 * @param request DeleteTaskRequest
 * @return DeleteTaskResponse
 */
async function deleteTask(request: DeleteTaskRequest): DeleteTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteTaskWithOptions(request, runtime);
}

model DescribeAdvanceSearchLeftVariableListRequest {
  lang?: string(name='Lang'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  regId?: string(name='regId'),
  scene?: string(name='scene', description='This parameter is required.'),
}

model DescribeAdvanceSearchLeftVariableListResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      code?: string(name='code'),
      description?: string(name='description'),
      displayType?: string(name='displayType'),
      fieldRank?: long(name='fieldRank'),
      fieldType?: string(name='fieldType'),
      id?: long(name='id'),
      name?: string(name='name'),
      parentName?: string(name='parentName'),
      sourceType?: string(name='sourceType'),
      title?: string(name='title'),
      type?: string(name='type'),
    }
  ](name='resultObject'),
}

model DescribeAdvanceSearchLeftVariableListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAdvanceSearchLeftVariableListResponseBody(name='body'),
}

/**
 * @summary 高级查询获取左变量接口
 *
 * @param request DescribeAdvanceSearchLeftVariableListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAdvanceSearchLeftVariableListResponse
 */
async function describeAdvanceSearchLeftVariableListWithOptions(request: DescribeAdvanceSearchLeftVariableListRequest, runtime: Util.RuntimeOptions): DescribeAdvanceSearchLeftVariableListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAdvanceSearchLeftVariableList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 高级查询获取左变量接口
 *
 * @param request DescribeAdvanceSearchLeftVariableListRequest
 * @return DescribeAdvanceSearchLeftVariableListResponse
 */
async function describeAdvanceSearchLeftVariableList(request: DescribeAdvanceSearchLeftVariableListRequest): DescribeAdvanceSearchLeftVariableListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAdvanceSearchLeftVariableListWithOptions(request, runtime);
}

model DescribeAdvanceSearchPageListRequest {
  lang?: string(name='Lang'),
  condition?: string(name='condition'),
  currentPage?: long(name='currentPage', description='This parameter is required.'),
  eventBeginTime?: long(name='eventBeginTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  eventEndTime?: long(name='eventEndTime', description='This parameter is required.'),
  fieldName?: string(name='fieldName'),
  fieldValue?: string(name='fieldValue'),
  pageSize?: long(name='pageSize', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeAdvanceSearchPageListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    currentPage?: long(name='currentPage'),
    data?: [  map[string]any ](name='data'),
    header?: [ 
      {
        fieldName?: string(name='fieldName'),
        fieldTitle?: string(name='fieldTitle'),
        isDefault?: boolean(name='isDefault'),
      }
    ](name='header'),
    pageSize?: long(name='pageSize'),
    totalItem?: long(name='totalItem'),
    totalPage?: long(name='totalPage'),
  }(name='resultObject'),
}

model DescribeAdvanceSearchPageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAdvanceSearchPageListResponseBody(name='body'),
}

/**
 * @summary 高级查询
 *
 * @param request DescribeAdvanceSearchPageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAdvanceSearchPageListResponse
 */
async function describeAdvanceSearchPageListWithOptions(request: DescribeAdvanceSearchPageListRequest, runtime: Util.RuntimeOptions): DescribeAdvanceSearchPageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.condition)) {
    query['condition'] = request.condition;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.eventBeginTime)) {
    query['eventBeginTime'] = request.eventBeginTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.eventEndTime)) {
    query['eventEndTime'] = request.eventEndTime;
  }
  if (!Util.isUnset(request.fieldName)) {
    query['fieldName'] = request.fieldName;
  }
  if (!Util.isUnset(request.fieldValue)) {
    query['fieldValue'] = request.fieldValue;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAdvanceSearchPageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 高级查询
 *
 * @param request DescribeAdvanceSearchPageListRequest
 * @return DescribeAdvanceSearchPageListResponse
 */
async function describeAdvanceSearchPageList(request: DescribeAdvanceSearchPageListRequest): DescribeAdvanceSearchPageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAdvanceSearchPageListWithOptions(request, runtime);
}

model DescribeAllDataSourceRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeAllDataSourceResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      eventCode?: string(name='eventCode'),
      eventName?: string(name='eventName'),
      id?: long(name='id'),
    }
  ](name='resultObject'),
}

model DescribeAllDataSourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAllDataSourceResponseBody(name='body'),
}

/**
 * @summary 数据源列表
 *
 * @param request DescribeAllDataSourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAllDataSourceResponse
 */
async function describeAllDataSourceWithOptions(request: DescribeAllDataSourceRequest, runtime: Util.RuntimeOptions): DescribeAllDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAllDataSource',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 数据源列表
 *
 * @param request DescribeAllDataSourceRequest
 * @return DescribeAllDataSourceResponse
 */
async function describeAllDataSource(request: DescribeAllDataSourceRequest): DescribeAllDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAllDataSourceWithOptions(request, runtime);
}

model DescribeAllEventNameAndCodeRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  regId?: string(name='regId'),
}

model DescribeAllEventNameAndCodeResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      children?: [ 
        {
          createType?: string(name='createType'),
          eventCode?: string(name='eventCode'),
          eventName?: string(name='eventName'),
          eventType?: string(name='eventType'),
        }
      ](name='children'),
      createType?: string(name='createType'),
      eventCode?: string(name='eventCode'),
      eventName?: string(name='eventName'),
      eventType?: string(name='eventType'),
    }
  ](name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeAllEventNameAndCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAllEventNameAndCodeResponseBody(name='body'),
}

/**
 * @summary 事件列表查询
 *
 * @param request DescribeAllEventNameAndCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAllEventNameAndCodeResponse
 */
async function describeAllEventNameAndCodeWithOptions(request: DescribeAllEventNameAndCodeRequest, runtime: Util.RuntimeOptions): DescribeAllEventNameAndCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAllEventNameAndCode',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 事件列表查询
 *
 * @param request DescribeAllEventNameAndCodeRequest
 * @return DescribeAllEventNameAndCodeResponse
 */
async function describeAllEventNameAndCode(request: DescribeAllEventNameAndCodeRequest): DescribeAllEventNameAndCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAllEventNameAndCodeWithOptions(request, runtime);
}

model DescribeAllRootVariableRequest {
  lang?: string(name='Lang'),
  sourceIp?: string(name='SourceIp'),
  deviceVariableIds?: string(name='deviceVariableIds'),
  eventCode?: string(name='eventCode'),
  expressionVariableIds?: string(name='expressionVariableIds'),
  id?: long(name='id'),
  nativeVariableIds?: string(name='nativeVariableIds'),
  queryVariableIds?: string(name='queryVariableIds'),
  regId?: string(name='regId'),
  velocityVariableIds?: string(name='velocityVariableIds'),
}

model DescribeAllRootVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      code?: string(name='code'),
      description?: string(name='description'),
      displayType?: string(name='displayType'),
      favoriteFlag?: boolean(name='favoriteFlag'),
      fieldRank?: long(name='fieldRank'),
      fieldType?: string(name='fieldType'),
      id?: long(name='id'),
      inputFieldType?: string(name='inputFieldType'),
      inputs?: string(name='inputs'),
      name?: string(name='name'),
      outputThreshold?: {
        maxValue?: double(name='maxValue'),
        minValue?: double(name='minValue'),
      }(name='outputThreshold'),
      sourceType?: string(name='sourceType'),
      title?: string(name='title'),
      type?: string(name='type'),
    }
  ](name='resultObject'),
}

model DescribeAllRootVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAllRootVariableResponseBody(name='body'),
}

/**
 * @summary 自定义表达式测试时，展示所有的根变量
 *
 * @param request DescribeAllRootVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAllRootVariableResponse
 */
async function describeAllRootVariableWithOptions(request: DescribeAllRootVariableRequest, runtime: Util.RuntimeOptions): DescribeAllRootVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.sourceIp)) {
    query['SourceIp'] = request.sourceIp;
  }
  if (!Util.isUnset(request.deviceVariableIds)) {
    query['deviceVariableIds'] = request.deviceVariableIds;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.expressionVariableIds)) {
    query['expressionVariableIds'] = request.expressionVariableIds;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.nativeVariableIds)) {
    query['nativeVariableIds'] = request.nativeVariableIds;
  }
  if (!Util.isUnset(request.queryVariableIds)) {
    query['queryVariableIds'] = request.queryVariableIds;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.velocityVariableIds)) {
    query['velocityVariableIds'] = request.velocityVariableIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAllRootVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 自定义表达式测试时，展示所有的根变量
 *
 * @param request DescribeAllRootVariableRequest
 * @return DescribeAllRootVariableResponse
 */
async function describeAllRootVariable(request: DescribeAllRootVariableRequest): DescribeAllRootVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAllRootVariableWithOptions(request, runtime);
}

model DescribeAnalysisColumnFieldListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeAnalysisColumnFieldListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeAnalysisColumnFieldListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAnalysisColumnFieldListResponseBody(name='body'),
}

/**
 * @summary 展示所有字段
 *
 * @param request DescribeAnalysisColumnFieldListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAnalysisColumnFieldListResponse
 */
async function describeAnalysisColumnFieldListWithOptions(request: DescribeAnalysisColumnFieldListRequest, runtime: Util.RuntimeOptions): DescribeAnalysisColumnFieldListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAnalysisColumnFieldList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 展示所有字段
 *
 * @param request DescribeAnalysisColumnFieldListRequest
 * @return DescribeAnalysisColumnFieldListResponse
 */
async function describeAnalysisColumnFieldList(request: DescribeAnalysisColumnFieldListRequest): DescribeAnalysisColumnFieldListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAnalysisColumnFieldListWithOptions(request, runtime);
}

model DescribeAnalysisColumnListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeAnalysisColumnListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      eventCode?: string(name='eventCode'),
      eventName?: string(name='eventName'),
      isDefault?: boolean(name='isDefault'),
      variableName?: string(name='variableName'),
      variableTitle?: string(name='variableTitle'),
      variableType?: string(name='variableType'),
    }
  ](name='resultObject'),
}

model DescribeAnalysisColumnListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAnalysisColumnListResponseBody(name='body'),
}

/**
 * @summary 查询自定义列
 *
 * @param request DescribeAnalysisColumnListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAnalysisColumnListResponse
 */
async function describeAnalysisColumnListWithOptions(request: DescribeAnalysisColumnListRequest, runtime: Util.RuntimeOptions): DescribeAnalysisColumnListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAnalysisColumnList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询自定义列
 *
 * @param request DescribeAnalysisColumnListRequest
 * @return DescribeAnalysisColumnListResponse
 */
async function describeAnalysisColumnList(request: DescribeAnalysisColumnListRequest): DescribeAnalysisColumnListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAnalysisColumnListWithOptions(request, runtime);
}

model DescribeAnalysisConditionFavoriteListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeAnalysisConditionFavoriteListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      condition?: string(name='condition'),
      eventBeginTime?: long(name='eventBeginTime'),
      eventCodes?: string(name='eventCodes'),
      eventEndTime?: long(name='eventEndTime'),
      fieldName?: string(name='fieldName'),
      fieldValue?: string(name='fieldValue'),
      id?: long(name='id'),
      name?: string(name='name'),
      type?: string(name='type'),
    }
  ](name='resultObject'),
}

model DescribeAnalysisConditionFavoriteListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAnalysisConditionFavoriteListResponseBody(name='body'),
}

/**
 * @summary 查询条件列表
 *
 * @param request DescribeAnalysisConditionFavoriteListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAnalysisConditionFavoriteListResponse
 */
async function describeAnalysisConditionFavoriteListWithOptions(request: DescribeAnalysisConditionFavoriteListRequest, runtime: Util.RuntimeOptions): DescribeAnalysisConditionFavoriteListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAnalysisConditionFavoriteList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询条件列表
 *
 * @param request DescribeAnalysisConditionFavoriteListRequest
 * @return DescribeAnalysisConditionFavoriteListResponse
 */
async function describeAnalysisConditionFavoriteList(request: DescribeAnalysisConditionFavoriteListRequest): DescribeAnalysisConditionFavoriteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAnalysisConditionFavoriteListWithOptions(request, runtime);
}

model DescribeAnalysisExportTaskDownloadUrlRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeAnalysisExportTaskDownloadUrlResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    downloadFileUrl?: string(name='downloadFileUrl'),
    executeTime?: long(name='executeTime'),
    status?: string(name='status'),
  }(name='resultObject'),
}

model DescribeAnalysisExportTaskDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAnalysisExportTaskDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 下载查询结果
 *
 * @param request DescribeAnalysisExportTaskDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAnalysisExportTaskDownloadUrlResponse
 */
async function describeAnalysisExportTaskDownloadUrlWithOptions(request: DescribeAnalysisExportTaskDownloadUrlRequest, runtime: Util.RuntimeOptions): DescribeAnalysisExportTaskDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAnalysisExportTaskDownloadUrl',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下载查询结果
 *
 * @param request DescribeAnalysisExportTaskDownloadUrlRequest
 * @return DescribeAnalysisExportTaskDownloadUrlResponse
 */
async function describeAnalysisExportTaskDownloadUrl(request: DescribeAnalysisExportTaskDownloadUrlRequest): DescribeAnalysisExportTaskDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAnalysisExportTaskDownloadUrlWithOptions(request, runtime);
}

model DescribeApiRequest {
  lang?: string(name='Lang'),
  apiId?: string(name='apiId', description='This parameter is required.'),
  apiRegionId?: string(name='apiRegionId', description='This parameter is required.'),
  apiType?: string(name='apiType', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeApiResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiResponseBody(name='body'),
}

/**
 * @summary 得到api详情
 *
 * @param request DescribeApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiResponse
 */
async function describeApiWithOptions(request: DescribeApiRequest, runtime: Util.RuntimeOptions): DescribeApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.apiId)) {
    query['apiId'] = request.apiId;
  }
  if (!Util.isUnset(request.apiRegionId)) {
    query['apiRegionId'] = request.apiRegionId;
  }
  if (!Util.isUnset(request.apiType)) {
    query['apiType'] = request.apiType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApi',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 得到api详情
 *
 * @param request DescribeApiRequest
 * @return DescribeApiResponse
 */
async function describeApi(request: DescribeApiRequest): DescribeApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiWithOptions(request, runtime);
}

model DescribeApiGroupsRequest {
  lang?: string(name='Lang'),
  apiRegionId?: string(name='apiRegionId', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeApiGroupsResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeApiGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiGroupsResponseBody(name='body'),
}

/**
 * @summary 得到api分组包括用户购买的以及自定义的
 *
 * @param request DescribeApiGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiGroupsResponse
 */
async function describeApiGroupsWithOptions(request: DescribeApiGroupsRequest, runtime: Util.RuntimeOptions): DescribeApiGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.apiRegionId)) {
    query['apiRegionId'] = request.apiRegionId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiGroups',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 得到api分组包括用户购买的以及自定义的
 *
 * @param request DescribeApiGroupsRequest
 * @return DescribeApiGroupsResponse
 */
async function describeApiGroups(request: DescribeApiGroupsRequest): DescribeApiGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiGroupsWithOptions(request, runtime);
}

model DescribeApiLimitRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeApiLimitResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    limit?: boolean(name='limit'),
    maxTotalItem?: long(name='maxTotalItem'),
    totalItem?: long(name='totalItem'),
  }(name='resultObject'),
}

model DescribeApiLimitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiLimitResponseBody(name='body'),
}

/**
 * @summary 查询创建api任务的limit信息
 *
 * @param request DescribeApiLimitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiLimitResponse
 */
async function describeApiLimitWithOptions(request: DescribeApiLimitRequest, runtime: Util.RuntimeOptions): DescribeApiLimitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiLimit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询创建api任务的limit信息
 *
 * @param request DescribeApiLimitRequest
 * @return DescribeApiLimitResponse
 */
async function describeApiLimit(request: DescribeApiLimitRequest): DescribeApiLimitResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiLimitWithOptions(request, runtime);
}

model DescribeApiNameListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeApiNameListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      apiId?: string(name='apiId'),
      apiName?: string(name='apiName'),
    }
  ](name='resultObject'),
}

model DescribeApiNameListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiNameListResponseBody(name='body'),
}

/**
 * @summary 获取api服务名称
 *
 * @param request DescribeApiNameListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiNameListResponse
 */
async function describeApiNameListWithOptions(request: DescribeApiNameListRequest, runtime: Util.RuntimeOptions): DescribeApiNameListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiNameList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取api服务名称
 *
 * @param request DescribeApiNameListRequest
 * @return DescribeApiNameListResponse
 */
async function describeApiNameList(request: DescribeApiNameListRequest): DescribeApiNameListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiNameListWithOptions(request, runtime);
}

model DescribeApiVariableRequest {
  lang?: string(name='Lang'),
  id?: string(name='id', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeApiVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeApiVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApiVariableResponseBody(name='body'),
}

/**
 * @summary 查询变量详情
 *
 * @param request DescribeApiVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApiVariableResponse
 */
async function describeApiVariableWithOptions(request: DescribeApiVariableRequest, runtime: Util.RuntimeOptions): DescribeApiVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApiVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量详情
 *
 * @param request DescribeApiVariableRequest
 * @return DescribeApiVariableResponse
 */
async function describeApiVariable(request: DescribeApiVariableRequest): DescribeApiVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApiVariableWithOptions(request, runtime);
}

model DescribeApisRequest {
  lang?: string(name='Lang'),
  apiGroupId?: string(name='apiGroupId', description='This parameter is required.'),
  apiRegionId?: string(name='apiRegionId', description='This parameter is required.'),
  apiType?: string(name='apiType', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeApisResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeApisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeApisResponseBody(name='body'),
}

/**
 * @summary 得到api列表包括用户购买的以及自定义的
 *
 * @param request DescribeApisRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeApisResponse
 */
async function describeApisWithOptions(request: DescribeApisRequest, runtime: Util.RuntimeOptions): DescribeApisResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.apiGroupId)) {
    query['apiGroupId'] = request.apiGroupId;
  }
  if (!Util.isUnset(request.apiRegionId)) {
    query['apiRegionId'] = request.apiRegionId;
  }
  if (!Util.isUnset(request.apiType)) {
    query['apiType'] = request.apiType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeApis',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 得到api列表包括用户购买的以及自定义的
 *
 * @param request DescribeApisRequest
 * @return DescribeApisResponse
 */
async function describeApis(request: DescribeApisRequest): DescribeApisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeApisWithOptions(request, runtime);
}

model DescribeAppKeyPageRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
}

model DescribeAppKeyPageResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      androidSdkUrl?: string(name='androidSdkUrl'),
      androidSdkVersion?: string(name='androidSdkVersion'),
      appKey?: string(name='appKey'),
      gmtCreate?: long(name='gmtCreate'),
      iosSdkUrl?: string(name='iosSdkUrl'),
      iosSdkVersion?: string(name='iosSdkVersion'),
      memo?: string(name='memo'),
      sdkItems?: string(name='sdkItems'),
      used?: string(name='used'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeAppKeyPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppKeyPageResponseBody(name='body'),
}

/**
 * @summary 查询appKey列表
 *
 * @param request DescribeAppKeyPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppKeyPageResponse
 */
async function describeAppKeyPageWithOptions(request: DescribeAppKeyPageRequest, runtime: Util.RuntimeOptions): DescribeAppKeyPageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAppKeyPage',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询appKey列表
 *
 * @param request DescribeAppKeyPageRequest
 * @return DescribeAppKeyPageResponse
 */
async function describeAppKeyPage(request: DescribeAppKeyPageRequest): DescribeAppKeyPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAppKeyPageWithOptions(request, runtime);
}

model DescribeAuditConfigRequest {
  lang?: string(name='Lang'),
  auditRelationType?: string(name='auditRelationType'),
  regId?: string(name='regId'),
}

model DescribeAuditConfigResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeAuditConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuditConfigResponseBody(name='body'),
}

/**
 * @summary 审批开关
 *
 * @param request DescribeAuditConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuditConfigResponse
 */
async function describeAuditConfigWithOptions(request: DescribeAuditConfigRequest, runtime: Util.RuntimeOptions): DescribeAuditConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.auditRelationType)) {
    query['auditRelationType'] = request.auditRelationType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuditConfig',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 审批开关
 *
 * @param request DescribeAuditConfigRequest
 * @return DescribeAuditConfigResponse
 */
async function describeAuditConfig(request: DescribeAuditConfigRequest): DescribeAuditConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuditConfigWithOptions(request, runtime);
}

model DescribeAuditDetailsRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeAuditDetailsResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeAuditDetailsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuditDetailsResponseBody(name='body'),
}

/**
 * @summary 审批详情
 *
 * @param request DescribeAuditDetailsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuditDetailsResponse
 */
async function describeAuditDetailsWithOptions(request: DescribeAuditDetailsRequest, runtime: Util.RuntimeOptions): DescribeAuditDetailsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuditDetails',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 审批详情
 *
 * @param request DescribeAuditDetailsRequest
 * @return DescribeAuditDetailsResponse
 */
async function describeAuditDetails(request: DescribeAuditDetailsRequest): DescribeAuditDetailsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuditDetailsWithOptions(request, runtime);
}

model DescribeAuditPageListRequest {
  lang?: string(name='Lang'),
  auditStatus?: string(name='auditStatus'),
  currentPage?: string(name='currentPage'),
  eventCode?: string(name='eventCode'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  ruleName?: string(name='ruleName'),
}

model DescribeAuditPageListResponseBody = {
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: long(name='totalPage'),
}

model DescribeAuditPageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuditPageListResponseBody(name='body'),
}

/**
 * @summary 审核列表展示、查询
 *
 * @param request DescribeAuditPageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuditPageListResponse
 */
async function describeAuditPageListWithOptions(request: DescribeAuditPageListRequest, runtime: Util.RuntimeOptions): DescribeAuditPageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.auditStatus)) {
    query['auditStatus'] = request.auditStatus;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuditPageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 审核列表展示、查询
 *
 * @param request DescribeAuditPageListRequest
 * @return DescribeAuditPageListResponse
 */
async function describeAuditPageList(request: DescribeAuditPageListRequest): DescribeAuditPageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuditPageListWithOptions(request, runtime);
}

model DescribeAuthEventNameListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeAuthEventNameListResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeAuthEventNameListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuthEventNameListResponseBody(name='body'),
}

/**
 * @summary 查询当前用户的事件名列表
 *
 * @param request DescribeAuthEventNameListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuthEventNameListResponse
 */
async function describeAuthEventNameListWithOptions(request: DescribeAuthEventNameListRequest, runtime: Util.RuntimeOptions): DescribeAuthEventNameListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuthEventNameList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询当前用户的事件名列表
 *
 * @param request DescribeAuthEventNameListRequest
 * @return DescribeAuthEventNameListResponse
 */
async function describeAuthEventNameList(request: DescribeAuthEventNameListRequest): DescribeAuthEventNameListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuthEventNameListWithOptions(request, runtime);
}

model DescribeAuthRulePageListRequest {
  lang?: string(name='Lang'),
  eventCode?: string(name='eventCode'),
  regId?: string(name='regId', description='This parameter is required.'),
  ruleName?: string(name='ruleName'),
  status?: string(name='status'),
}

model DescribeAuthRulePageListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: long(name='currentPage'),
  pageSize?: long(name='pageSize'),
  resultObject?: [ 
    {
      consoleRuleId?: long(name='consoleRuleId'),
      createType?: string(name='createType'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      memo?: string(name='memo'),
      ruleId?: string(name='ruleId'),
      ruleName?: string(name='ruleName'),
      ruleVersionId?: long(name='ruleVersionId'),
      status?: string(name='status'),
      version?: long(name='version'),
    }
  ](name='resultObject'),
  totalItem?: long(name='totalItem'),
  totalPage?: long(name='totalPage'),
}

model DescribeAuthRulePageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuthRulePageListResponseBody(name='body'),
}

/**
 * @summary 策略列表
 *
 * @param request DescribeAuthRulePageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuthRulePageListResponse
 */
async function describeAuthRulePageListWithOptions(request: DescribeAuthRulePageListRequest, runtime: Util.RuntimeOptions): DescribeAuthRulePageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuthRulePageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 策略列表
 *
 * @param request DescribeAuthRulePageListRequest
 * @return DescribeAuthRulePageListResponse
 */
async function describeAuthRulePageList(request: DescribeAuthRulePageListRequest): DescribeAuthRulePageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuthRulePageListWithOptions(request, runtime);
}

model DescribeAuthSceneListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeAuthSceneListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      serviceCode?: string(name='serviceCode'),
    }
  ](name='resultObject'),
}

model DescribeAuthSceneListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuthSceneListResponseBody(name='body'),
}

/**
 * @summary 场景列表
 *
 * @param request DescribeAuthSceneListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuthSceneListResponse
 */
async function describeAuthSceneListWithOptions(request: DescribeAuthSceneListRequest, runtime: Util.RuntimeOptions): DescribeAuthSceneListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuthSceneList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 场景列表
 *
 * @param request DescribeAuthSceneListRequest
 * @return DescribeAuthSceneListResponse
 */
async function describeAuthSceneList(request: DescribeAuthSceneListRequest): DescribeAuthSceneListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuthSceneListWithOptions(request, runtime);
}

model DescribeAuthScenePageListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
  sceneName?: string(name='sceneName'),
}

model DescribeAuthScenePageListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: long(name='currentPage'),
  pageSize?: long(name='pageSize'),
  resultObject?: [ 
    {
      commonRuleCount?: long(name='commonRuleCount'),
      customRuleCount?: long(name='customRuleCount'),
      eventCode?: string(name='eventCode'),
      sceneName?: string(name='sceneName'),
      serverName?: string(name='serverName'),
    }
  ](name='resultObject'),
  totalItem?: long(name='totalItem'),
  totalPage?: long(name='totalPage'),
}

model DescribeAuthScenePageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuthScenePageListResponseBody(name='body'),
}

/**
 * @summary 场景列表
 *
 * @param request DescribeAuthScenePageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuthScenePageListResponse
 */
async function describeAuthScenePageListWithOptions(request: DescribeAuthScenePageListRequest, runtime: Util.RuntimeOptions): DescribeAuthScenePageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sceneName)) {
    query['sceneName'] = request.sceneName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuthScenePageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 场景列表
 *
 * @param request DescribeAuthScenePageListRequest
 * @return DescribeAuthScenePageListResponse
 */
async function describeAuthScenePageList(request: DescribeAuthScenePageListRequest): DescribeAuthScenePageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuthScenePageListWithOptions(request, runtime);
}

model DescribeAuthStatusRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeAuthStatusResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeAuthStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAuthStatusResponseBody(name='body'),
}

/**
 * @summary 查看是否授权
 *
 * @param request DescribeAuthStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAuthStatusResponse
 */
async function describeAuthStatusWithOptions(request: DescribeAuthStatusRequest, runtime: Util.RuntimeOptions): DescribeAuthStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAuthStatus',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看是否授权
 *
 * @param request DescribeAuthStatusRequest
 * @return DescribeAuthStatusResponse
 */
async function describeAuthStatus(request: DescribeAuthStatusRequest): DescribeAuthStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAuthStatusWithOptions(request, runtime);
}

model DescribeAvgExecuteCostReportRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeAvgExecuteCostReportResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      ratio?: string(name='ratio'),
      value?: string(name='value'),
    }
  ](name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeAvgExecuteCostReportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAvgExecuteCostReportResponseBody(name='body'),
}

/**
 * @summary 平均执行耗时
 *
 * @param request DescribeAvgExecuteCostReportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAvgExecuteCostReportResponse
 */
async function describeAvgExecuteCostReportWithOptions(request: DescribeAvgExecuteCostReportRequest, runtime: Util.RuntimeOptions): DescribeAvgExecuteCostReportResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAvgExecuteCostReport',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 平均执行耗时
 *
 * @param request DescribeAvgExecuteCostReportRequest
 * @return DescribeAvgExecuteCostReportResponse
 */
async function describeAvgExecuteCostReport(request: DescribeAvgExecuteCostReportRequest): DescribeAvgExecuteCostReportResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAvgExecuteCostReportWithOptions(request, runtime);
}

model DescribeBasicSearchPageListRequest {
  lang?: string(name='Lang'),
  currentPage?: long(name='currentPage', description='This parameter is required.'),
  eventBeginTime?: long(name='eventBeginTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  eventEndTime?: long(name='eventEndTime', description='This parameter is required.'),
  fieldName?: string(name='fieldName'),
  fieldValue?: string(name='fieldValue'),
  pageSize?: long(name='pageSize', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeBasicSearchPageListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    currentPage?: long(name='currentPage'),
    data?: [  map[string]any ](name='data'),
    header?: [ 
      {
        fieldName?: string(name='fieldName'),
        fieldTitle?: string(name='fieldTitle'),
        isDefault?: boolean(name='isDefault'),
      }
    ](name='header'),
    pageSize?: long(name='pageSize'),
    totalItem?: long(name='totalItem'),
    totalPage?: long(name='totalPage'),
  }(name='resultObject'),
}

model DescribeBasicSearchPageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBasicSearchPageListResponseBody(name='body'),
}

/**
 * @summary 基础查询
 *
 * @param request DescribeBasicSearchPageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBasicSearchPageListResponse
 */
async function describeBasicSearchPageListWithOptions(request: DescribeBasicSearchPageListRequest, runtime: Util.RuntimeOptions): DescribeBasicSearchPageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.eventBeginTime)) {
    query['eventBeginTime'] = request.eventBeginTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.eventEndTime)) {
    query['eventEndTime'] = request.eventEndTime;
  }
  if (!Util.isUnset(request.fieldName)) {
    query['fieldName'] = request.fieldName;
  }
  if (!Util.isUnset(request.fieldValue)) {
    query['fieldValue'] = request.fieldValue;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBasicSearchPageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 基础查询
 *
 * @param request DescribeBasicSearchPageListRequest
 * @return DescribeBasicSearchPageListResponse
 */
async function describeBasicSearchPageList(request: DescribeBasicSearchPageListRequest): DescribeBasicSearchPageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBasicSearchPageListWithOptions(request, runtime);
}

model DescribeBasicStartRequest {
  appKey?: string(name='appKey'),
  endDs?: string(name='endDs'),
  regId?: string(name='regId'),
  service?: string(name='service'),
  startDs?: string(name='startDs'),
}

model DescribeBasicStartResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeBasicStartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBasicStartResponseBody(name='body'),
}

/**
 * @summary 基础统计
 *
 * @param request DescribeBasicStartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBasicStartResponse
 */
async function describeBasicStartWithOptions(request: DescribeBasicStartRequest, runtime: Util.RuntimeOptions): DescribeBasicStartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appKey)) {
    query['appKey'] = request.appKey;
  }
  if (!Util.isUnset(request.endDs)) {
    query['endDs'] = request.endDs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.service)) {
    query['service'] = request.service;
  }
  if (!Util.isUnset(request.startDs)) {
    query['startDs'] = request.startDs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBasicStart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 基础统计
 *
 * @param request DescribeBasicStartRequest
 * @return DescribeBasicStartResponse
 */
async function describeBasicStart(request: DescribeBasicStartRequest): DescribeBasicStartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBasicStartWithOptions(request, runtime);
}

model DescribeByPassShuntEventRequest {
  lang?: string(name='Lang'),
  eventId?: long(name='eventId'),
  regId?: string(name='regId'),
}

model DescribeByPassShuntEventResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    eventName?: string(name='eventName'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeByPassShuntEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeByPassShuntEventResponseBody(name='body'),
}

/**
 * @summary 查看旁路事件
 *
 * @param request DescribeByPassShuntEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeByPassShuntEventResponse
 */
async function describeByPassShuntEventWithOptions(request: DescribeByPassShuntEventRequest, runtime: Util.RuntimeOptions): DescribeByPassShuntEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventId)) {
    query['eventId'] = request.eventId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeByPassShuntEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看旁路事件
 *
 * @param request DescribeByPassShuntEventRequest
 * @return DescribeByPassShuntEventResponse
 */
async function describeByPassShuntEvent(request: DescribeByPassShuntEventRequest): DescribeByPassShuntEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeByPassShuntEventWithOptions(request, runtime);
}

model DescribeCustVariableConfigListRequest {
  lang?: string(name='Lang'),
  bizType?: string(name='bizType', description='This parameter is required.'),
  regId?: string(name='regId'),
  timeType?: string(name='timeType'),
}

model DescribeCustVariableConfigListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      configKey?: string(name='configKey'),
      configValue?: string(name='configValue'),
    }
  ](name='resultObject'),
}

model DescribeCustVariableConfigListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCustVariableConfigListResponseBody(name='body'),
}

/**
 * @summary 查询自定义累计变量的类型配置
 *
 * @param request DescribeCustVariableConfigListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCustVariableConfigListResponse
 */
async function describeCustVariableConfigListWithOptions(request: DescribeCustVariableConfigListRequest, runtime: Util.RuntimeOptions): DescribeCustVariableConfigListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.bizType)) {
    query['bizType'] = request.bizType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.timeType)) {
    query['timeType'] = request.timeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCustVariableConfigList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询自定义累计变量的类型配置
 *
 * @param request DescribeCustVariableConfigListRequest
 * @return DescribeCustVariableConfigListResponse
 */
async function describeCustVariableConfigList(request: DescribeCustVariableConfigListRequest): DescribeCustVariableConfigListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCustVariableConfigListWithOptions(request, runtime);
}

model DescribeCustVariableDetailRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeCustVariableDetailResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      condition?: string(name='condition'),
      dataVersion?: long(name='dataVersion'),
      description?: string(name='description'),
      eventCodes?: string(name='eventCodes'),
      historyValueType?: string(name='historyValueType'),
      id?: long(name='id'),
      object?: string(name='object'),
      outputs?: string(name='outputs'),
      subject?: string(name='subject'),
      timeType?: string(name='timeType'),
      title?: string(name='title'),
      twCount?: string(name='twCount'),
      velocityFC?: string(name='velocityFC'),
      velocityTW?: string(name='velocityTW'),
    }
  ](name='resultObject'),
}

model DescribeCustVariableDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCustVariableDetailResponseBody(name='body'),
}

/**
 * @summary 累计变量详情
 *
 * @param request DescribeCustVariableDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCustVariableDetailResponse
 */
async function describeCustVariableDetailWithOptions(request: DescribeCustVariableDetailRequest, runtime: Util.RuntimeOptions): DescribeCustVariableDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCustVariableDetail',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 累计变量详情
 *
 * @param request DescribeCustVariableDetailRequest
 * @return DescribeCustVariableDetailResponse
 */
async function describeCustVariableDetail(request: DescribeCustVariableDetailRequest): DescribeCustVariableDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCustVariableDetailWithOptions(request, runtime);
}

model DescribeCustVariablePageRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  currentPage?: int32(name='currentPage'),
  description?: string(name='description'),
  eventCode?: string(name='eventCode'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
}

model DescribeCustVariablePageResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      dataVersion?: long(name='dataVersion'),
      description?: string(name='description'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      name?: string(name='name'),
      status?: string(name='status'),
      title?: string(name='title'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeCustVariablePageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCustVariablePageResponseBody(name='body'),
}

/**
 * @summary 查询自定义累计变量列表
 *
 * @param request DescribeCustVariablePageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCustVariablePageResponse
 */
async function describeCustVariablePageWithOptions(request: DescribeCustVariablePageRequest, runtime: Util.RuntimeOptions): DescribeCustVariablePageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCustVariablePage',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询自定义累计变量列表
 *
 * @param request DescribeCustVariablePageRequest
 * @return DescribeCustVariablePageResponse
 */
async function describeCustVariablePage(request: DescribeCustVariablePageRequest): DescribeCustVariablePageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCustVariablePageWithOptions(request, runtime);
}

model DescribeDataSourceDataDownloadUrlRequest {
  lang?: string(name='Lang'),
  dataSourceId?: long(name='dataSourceId', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeDataSourceDataDownloadUrlResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    downloadFileUrl?: string(name='downloadFileUrl'),
  }(name='resultObject'),
}

model DescribeDataSourceDataDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDataSourceDataDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 获取数据源数据下载链接
 *
 * @param request DescribeDataSourceDataDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDataSourceDataDownloadUrlResponse
 */
async function describeDataSourceDataDownloadUrlWithOptions(request: DescribeDataSourceDataDownloadUrlRequest, runtime: Util.RuntimeOptions): DescribeDataSourceDataDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    query['dataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDataSourceDataDownloadUrl',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取数据源数据下载链接
 *
 * @param request DescribeDataSourceDataDownloadUrlRequest
 * @return DescribeDataSourceDataDownloadUrlResponse
 */
async function describeDataSourceDataDownloadUrl(request: DescribeDataSourceDataDownloadUrlRequest): DescribeDataSourceDataDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDataSourceDataDownloadUrlWithOptions(request, runtime);
}

model DescribeDataSourceFieldsRequest {
  lang?: string(name='Lang'),
  dataSourceCode?: string(name='dataSourceCode', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeDataSourceFieldsResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeDataSourceFieldsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDataSourceFieldsResponseBody(name='body'),
}

/**
 * @summary 获取数据源所有字段
 *
 * @param request DescribeDataSourceFieldsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDataSourceFieldsResponse
 */
async function describeDataSourceFieldsWithOptions(request: DescribeDataSourceFieldsRequest, runtime: Util.RuntimeOptions): DescribeDataSourceFieldsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataSourceCode)) {
    query['dataSourceCode'] = request.dataSourceCode;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDataSourceFields',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取数据源所有字段
 *
 * @param request DescribeDataSourceFieldsRequest
 * @return DescribeDataSourceFieldsResponse
 */
async function describeDataSourceFields(request: DescribeDataSourceFieldsRequest): DescribeDataSourceFieldsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDataSourceFieldsWithOptions(request, runtime);
}

model DescribeDataSourcePageListRequest {
  lang?: string(name='Lang'),
  sourceIp?: string(name='SourceIp'),
  currentPage?: long(name='currentPage'),
  name?: string(name='name'),
  pageSize?: long(name='pageSize'),
  regId?: string(name='regId'),
  type?: string(name='type'),
}

model DescribeDataSourcePageListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      creator?: string(name='creator'),
      description?: string(name='description'),
      gmtCreate?: string(name='gmtCreate'),
      gmtModified?: string(name='gmtModified'),
      id?: long(name='id'),
      modifier?: string(name='modifier'),
      name?: string(name='name'),
      total?: long(name='total'),
      type?: string(name='type'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeDataSourcePageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDataSourcePageListResponseBody(name='body'),
}

/**
 * @summary 数据源列表接口
 *
 * @param request DescribeDataSourcePageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDataSourcePageListResponse
 */
async function describeDataSourcePageListWithOptions(request: DescribeDataSourcePageListRequest, runtime: Util.RuntimeOptions): DescribeDataSourcePageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.sourceIp)) {
    query['SourceIp'] = request.sourceIp;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDataSourcePageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 数据源列表接口
 *
 * @param request DescribeDataSourcePageListRequest
 * @return DescribeDataSourcePageListResponse
 */
async function describeDataSourcePageList(request: DescribeDataSourcePageListRequest): DescribeDataSourcePageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDataSourcePageListWithOptions(request, runtime);
}

model DescribeDecisionResultFluctuationRequest {
  lang?: string(name='Lang'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
}

model DescribeDecisionResultFluctuationResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      status?: string(name='status'),
      todayNum?: long(name='todayNum'),
      withinSevenDayNum?: string(name='withinSevenDayNum'),
      withinThirtyDayNum?: string(name='withinThirtyDayNum'),
      withinThreeDayNum?: string(name='withinThreeDayNum'),
      yesterdayNum?: long(name='yesterdayNum'),
    }
  ](name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeDecisionResultFluctuationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDecisionResultFluctuationResponseBody(name='body'),
}

/**
 * @summary 决策结果波动检测
 *
 * @param request DescribeDecisionResultFluctuationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDecisionResultFluctuationResponse
 */
async function describeDecisionResultFluctuationWithOptions(request: DescribeDecisionResultFluctuationRequest, runtime: Util.RuntimeOptions): DescribeDecisionResultFluctuationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDecisionResultFluctuation',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 决策结果波动检测
 *
 * @param request DescribeDecisionResultFluctuationRequest
 * @return DescribeDecisionResultFluctuationResponse
 */
async function describeDecisionResultFluctuation(request: DescribeDecisionResultFluctuationRequest): DescribeDecisionResultFluctuationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDecisionResultFluctuationWithOptions(request, runtime);
}

model DescribeDecisionResultTrendRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime'),
  endTime?: long(name='endTime'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
}

model DescribeDecisionResultTrendResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ 
          {
            num?: long(name='num'),
            scale?: string(name='scale'),
          }
        ](name='data'),
        name?: string(name='name'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeDecisionResultTrendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDecisionResultTrendResponseBody(name='body'),
}

/**
 * @summary 决策结果波动趋势
 *
 * @param request DescribeDecisionResultTrendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDecisionResultTrendResponse
 */
async function describeDecisionResultTrendWithOptions(request: DescribeDecisionResultTrendRequest, runtime: Util.RuntimeOptions): DescribeDecisionResultTrendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDecisionResultTrend',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 决策结果波动趋势
 *
 * @param request DescribeDecisionResultTrendRequest
 * @return DescribeDecisionResultTrendResponse
 */
async function describeDecisionResultTrend(request: DescribeDecisionResultTrendRequest): DescribeDecisionResultTrendResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDecisionResultTrendWithOptions(request, runtime);
}

model DescribeDetailStartRequest {
  appKey?: string(name='appKey'),
  endDs?: string(name='endDs'),
  regId?: string(name='regId'),
  service?: string(name='service'),
  startDs?: string(name='startDs'),
}

model DescribeDetailStartResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeDetailStartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDetailStartResponseBody(name='body'),
}

/**
 * @summary 详细统计
 *
 * @param request DescribeDetailStartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDetailStartResponse
 */
async function describeDetailStartWithOptions(request: DescribeDetailStartRequest, runtime: Util.RuntimeOptions): DescribeDetailStartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appKey)) {
    query['appKey'] = request.appKey;
  }
  if (!Util.isUnset(request.endDs)) {
    query['endDs'] = request.endDs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.service)) {
    query['service'] = request.service;
  }
  if (!Util.isUnset(request.startDs)) {
    query['startDs'] = request.startDs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDetailStart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 详细统计
 *
 * @param request DescribeDetailStartRequest
 * @return DescribeDetailStartResponse
 */
async function describeDetailStart(request: DescribeDetailStartRequest): DescribeDetailStartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDetailStartWithOptions(request, runtime);
}

model DescribeDownloadUrlRequest {
  fileType?: string(name='FileType'),
  lang?: string(name='Lang'),
  regId?: string(name='RegId'),
  taskId?: long(name='TaskId'),
  type?: string(name='Type'),
}

model DescribeDownloadUrlResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: string(name='resultObject'),
}

model DescribeDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 下载
 *
 * @param request DescribeDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDownloadUrlResponse
 */
async function describeDownloadUrlWithOptions(request: DescribeDownloadUrlRequest, runtime: Util.RuntimeOptions): DescribeDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.fileType)) {
    query['FileType'] = request.fileType;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['RegId'] = request.regId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDownloadUrl',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下载
 *
 * @param request DescribeDownloadUrlRequest
 * @return DescribeDownloadUrlResponse
 */
async function describeDownloadUrl(request: DescribeDownloadUrlRequest): DescribeDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDownloadUrlWithOptions(request, runtime);
}

model DescribeEventBaseInfoByEventCodeRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  regId?: string(name='regId'),
}

model DescribeEventBaseInfoByEventCodeResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    bizVersion?: int32(name='bizVersion'),
    eventCode?: string(name='eventCode'),
    eventName?: string(name='eventName'),
    eventStauts?: string(name='eventStauts'),
    inputFields?: [ 
      {
        description?: string(name='description'),
        fieldCode?: string(name='fieldCode'),
        fieldRank?: string(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        title?: string(name='title'),
      }
    ](name='inputFields'),
    memo?: string(name='memo'),
    ruleDetails?: [ 
      {
        logicExpression?: string(name='logicExpression'),
        memo?: string(name='memo'),
        ruleActions?: string(name='ruleActions'),
        ruleAuthType?: string(name='ruleAuthType'),
        ruleExpressions?: string(name='ruleExpressions'),
        ruleId?: string(name='ruleId'),
        ruleName?: string(name='ruleName'),
        ruleStatus?: string(name='ruleStatus'),
      }
    ](name='ruleDetails'),
    templateCode?: string(name='templateCode'),
    templateName?: string(name='templateName'),
    templateType?: string(name='templateType'),
  }(name='resultObject'),
}

model DescribeEventBaseInfoByEventCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventBaseInfoByEventCodeResponseBody(name='body'),
}

/**
 * @summary 查询事件详情
 *
 * @param request DescribeEventBaseInfoByEventCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventBaseInfoByEventCodeResponse
 */
async function describeEventBaseInfoByEventCodeWithOptions(request: DescribeEventBaseInfoByEventCodeRequest, runtime: Util.RuntimeOptions): DescribeEventBaseInfoByEventCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventBaseInfoByEventCode',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件详情
 *
 * @param request DescribeEventBaseInfoByEventCodeRequest
 * @return DescribeEventBaseInfoByEventCodeResponse
 */
async function describeEventBaseInfoByEventCode(request: DescribeEventBaseInfoByEventCodeRequest): DescribeEventBaseInfoByEventCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventBaseInfoByEventCodeWithOptions(request, runtime);
}

model DescribeEventCountRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  regId?: string(name='regId'),
}

model DescribeEventCountResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    limit?: boolean(name='limit'),
    maxTotalItem?: int32(name='maxTotalItem'),
    totalItem?: int32(name='totalItem'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeEventCountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventCountResponseBody(name='body'),
}

/**
 * @summary 查询事件总数量
 *
 * @param request DescribeEventCountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventCountResponse
 */
async function describeEventCountWithOptions(request: DescribeEventCountRequest, runtime: Util.RuntimeOptions): DescribeEventCountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventCount',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件总数量
 *
 * @param request DescribeEventCountRequest
 * @return DescribeEventCountResponse
 */
async function describeEventCount(request: DescribeEventCountRequest): DescribeEventCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventCountWithOptions(request, runtime);
}

model DescribeEventDetailByRequestIdRequest {
  lang?: string(name='Lang'),
  eventCode?: string(name='eventCode'),
  eventTime?: long(name='eventTime'),
  regId?: string(name='regId', description='This parameter is required.'),
  sRequestId?: string(name='sRequestId', description='This parameter is required.'),
}

model DescribeEventDetailByRequestIdResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeEventDetailByRequestIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventDetailByRequestIdResponseBody(name='body'),
}

/**
 * @summary 根据requestId查询事件详情
 *
 * @param request DescribeEventDetailByRequestIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventDetailByRequestIdResponse
 */
async function describeEventDetailByRequestIdWithOptions(request: DescribeEventDetailByRequestIdRequest, runtime: Util.RuntimeOptions): DescribeEventDetailByRequestIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.eventTime)) {
    query['eventTime'] = request.eventTime;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sRequestId)) {
    query['sRequestId'] = request.sRequestId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventDetailByRequestId',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据requestId查询事件详情
 *
 * @param request DescribeEventDetailByRequestIdRequest
 * @return DescribeEventDetailByRequestIdResponse
 */
async function describeEventDetailByRequestId(request: DescribeEventDetailByRequestIdRequest): DescribeEventDetailByRequestIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventDetailByRequestIdWithOptions(request, runtime);
}

model DescribeEventLogDetailRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  reqIdByLog?: string(name='reqIdByLog', description='This parameter is required.'),
}

model DescribeEventLogDetailResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeEventLogDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventLogDetailResponseBody(name='body'),
}

/**
 * @summary 查询事件历史详情
 *
 * @param request DescribeEventLogDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventLogDetailResponse
 */
async function describeEventLogDetailWithOptions(request: DescribeEventLogDetailRequest, runtime: Util.RuntimeOptions): DescribeEventLogDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.reqIdByLog)) {
    query['reqIdByLog'] = request.reqIdByLog;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventLogDetail',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件历史详情
 *
 * @param request DescribeEventLogDetailRequest
 * @return DescribeEventLogDetailResponse
 */
async function describeEventLogDetail(request: DescribeEventLogDetailRequest): DescribeEventLogDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventLogDetailWithOptions(request, runtime);
}

model DescribeEventLogPageRequest {
  lang?: string(name='Lang'),
  accountIdPRP?: string(name='accountIdPRP'),
  beginTime?: long(name='beginTime'),
  condition1AL?: string(name='condition1AL'),
  condition2AL?: string(name='condition2AL'),
  condition3AL?: string(name='condition3AL'),
  currentPage?: int32(name='currentPage'),
  deviceTypeLRP?: string(name='deviceTypeLRP'),
  emailPRP?: string(name='emailPRP'),
  endTime?: long(name='endTime'),
  failReasonLRP?: string(name='failReasonLRP'),
  ipPRP?: string(name='ipPRP'),
  loginResultARP?: string(name='loginResultARP'),
  loginTypeLRP?: string(name='loginTypeLRP'),
  macPRP?: string(name='macPRP'),
  mobilePRP?: string(name='mobilePRP'),
  nickNamePRP?: string(name='nickNamePRP'),
  operateSourceLRP?: string(name='operateSourceLRP'),
  pageSize?: int32(name='pageSize'),
  referPRP?: string(name='referPRP'),
  regId?: string(name='regId'),
  registerIpPRP?: string(name='registerIpPRP'),
  reqIdPBS?: string(name='reqIdPBS'),
  scoreEBS?: int32(name='scoreEBS'),
  scoreSBS?: int32(name='scoreSBS'),
  serviceABS?: string(name='serviceABS'),
  tagsLBS?: string(name='tagsLBS'),
  umidPDI?: string(name='umidPDI'),
  userAgentPRP?: string(name='userAgentPRP'),
  userNameTypeLRP?: string(name='userNameTypeLRP'),
}

model DescribeEventLogPageResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      accountId?: string(name='accountId'),
      email?: string(name='email'),
      ip?: string(name='ip'),
      mobile?: string(name='mobile'),
      nickName?: string(name='nickName'),
      requestId?: string(name='requestId'),
      score?: string(name='score'),
      service?: string(name='service'),
      tags?: string(name='tags'),
      timestamp?: string(name='timestamp'),
      umid?: string(name='umid'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeEventLogPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventLogPageResponseBody(name='body'),
}

/**
 * @summary 查询事件历史列表
 *
 * @param request DescribeEventLogPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventLogPageResponse
 */
async function describeEventLogPageWithOptions(request: DescribeEventLogPageRequest, runtime: Util.RuntimeOptions): DescribeEventLogPageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.accountIdPRP)) {
    query['accountIdPRP'] = request.accountIdPRP;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.condition1AL)) {
    query['condition1AL'] = request.condition1AL;
  }
  if (!Util.isUnset(request.condition2AL)) {
    query['condition2AL'] = request.condition2AL;
  }
  if (!Util.isUnset(request.condition3AL)) {
    query['condition3AL'] = request.condition3AL;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.deviceTypeLRP)) {
    query['deviceTypeLRP'] = request.deviceTypeLRP;
  }
  if (!Util.isUnset(request.emailPRP)) {
    query['emailPRP'] = request.emailPRP;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.failReasonLRP)) {
    query['failReasonLRP'] = request.failReasonLRP;
  }
  if (!Util.isUnset(request.ipPRP)) {
    query['ipPRP'] = request.ipPRP;
  }
  if (!Util.isUnset(request.loginResultARP)) {
    query['loginResultARP'] = request.loginResultARP;
  }
  if (!Util.isUnset(request.loginTypeLRP)) {
    query['loginTypeLRP'] = request.loginTypeLRP;
  }
  if (!Util.isUnset(request.macPRP)) {
    query['macPRP'] = request.macPRP;
  }
  if (!Util.isUnset(request.mobilePRP)) {
    query['mobilePRP'] = request.mobilePRP;
  }
  if (!Util.isUnset(request.nickNamePRP)) {
    query['nickNamePRP'] = request.nickNamePRP;
  }
  if (!Util.isUnset(request.operateSourceLRP)) {
    query['operateSourceLRP'] = request.operateSourceLRP;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.referPRP)) {
    query['referPRP'] = request.referPRP;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.registerIpPRP)) {
    query['registerIpPRP'] = request.registerIpPRP;
  }
  if (!Util.isUnset(request.reqIdPBS)) {
    query['reqIdPBS'] = request.reqIdPBS;
  }
  if (!Util.isUnset(request.scoreEBS)) {
    query['scoreEBS'] = request.scoreEBS;
  }
  if (!Util.isUnset(request.scoreSBS)) {
    query['scoreSBS'] = request.scoreSBS;
  }
  if (!Util.isUnset(request.serviceABS)) {
    query['serviceABS'] = request.serviceABS;
  }
  if (!Util.isUnset(request.tagsLBS)) {
    query['tagsLBS'] = request.tagsLBS;
  }
  if (!Util.isUnset(request.umidPDI)) {
    query['umidPDI'] = request.umidPDI;
  }
  if (!Util.isUnset(request.userAgentPRP)) {
    query['userAgentPRP'] = request.userAgentPRP;
  }
  if (!Util.isUnset(request.userNameTypeLRP)) {
    query['userNameTypeLRP'] = request.userNameTypeLRP;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventLogPage',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件历史列表
 *
 * @param request DescribeEventLogPageRequest
 * @return DescribeEventLogPageResponse
 */
async function describeEventLogPage(request: DescribeEventLogPageRequest): DescribeEventLogPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventLogPageWithOptions(request, runtime);
}

model DescribeEventPageListRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  currentPage?: int32(name='currentPage'),
  eventCode?: string(name='eventCode'),
  eventName?: string(name='eventName'),
  eventStatus?: string(name='eventStatus'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
}

model DescribeEventPageListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      children?: [ 
        {
          eventCode?: string(name='eventCode'),
          eventName?: string(name='eventName'),
          eventStatus?: string(name='eventStatus'),
          eventType?: string(name='eventType'),
          gmtCreate?: long(name='gmtCreate'),
          gmtModified?: long(name='gmtModified'),
          id?: long(name='id'),
          ruleCount?: long(name='ruleCount'),
        }
      ](name='children'),
      eventCode?: string(name='eventCode'),
      eventName?: string(name='eventName'),
      eventStatus?: string(name='eventStatus'),
      eventType?: string(name='eventType'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      ruleCount?: int32(name='ruleCount'),
      templateCode?: string(name='templateCode'),
      templateName?: string(name='templateName'),
      templateType?: string(name='templateType'),
      userCount?: int32(name='userCount'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeEventPageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventPageListResponseBody(name='body'),
}

/**
 * @summary 事件分页查询
 *
 * @param request DescribeEventPageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventPageListResponse
 */
async function describeEventPageListWithOptions(request: DescribeEventPageListRequest, runtime: Util.RuntimeOptions): DescribeEventPageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.eventName)) {
    query['eventName'] = request.eventName;
  }
  if (!Util.isUnset(request.eventStatus)) {
    query['eventStatus'] = request.eventStatus;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventPageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 事件分页查询
 *
 * @param request DescribeEventPageListRequest
 * @return DescribeEventPageListResponse
 */
async function describeEventPageList(request: DescribeEventPageListRequest): DescribeEventPageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventPageListWithOptions(request, runtime);
}

model DescribeEventResultBarChartRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime', description='This parameter is required.'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
}

model DescribeEventResultBarChartResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ 
          {
            num?: long(name='num'),
            scale?: string(name='scale'),
          }
        ](name='data'),
        name?: string(name='name'),
        stack?: string(name='stack'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeEventResultBarChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventResultBarChartResponseBody(name='body'),
}

/**
 * @summary 风险大盘
 *
 * @param request DescribeEventResultBarChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventResultBarChartResponse
 */
async function describeEventResultBarChartWithOptions(request: DescribeEventResultBarChartRequest, runtime: Util.RuntimeOptions): DescribeEventResultBarChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventResultBarChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 风险大盘
 *
 * @param request DescribeEventResultBarChartRequest
 * @return DescribeEventResultBarChartResponse
 */
async function describeEventResultBarChart(request: DescribeEventResultBarChartRequest): DescribeEventResultBarChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventResultBarChartWithOptions(request, runtime);
}

model DescribeEventResultListRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime', description='This parameter is required.'),
  currentPage?: long(name='currentPage'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  pageSize?: long(name='pageSize'),
  regId?: string(name='regId'),
}

model DescribeEventResultListResponseBody = {
  code?: string(name='code'),
  currentPage?: long(name='currentPage'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  pageSize?: long(name='pageSize'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      eventCode?: string(name='eventCode'),
      eventName?: string(name='eventName'),
      passNum?: long(name='passNum'),
      pendingNum?: long(name='pendingNum'),
      rejectNum?: long(name='rejectNum'),
      totalNum?: long(name='totalNum'),
    }
  ](name='resultObject'),
  success?: boolean(name='success'),
  totalItem?: long(name='totalItem'),
  totalPage?: long(name='totalPage'),
}

model DescribeEventResultListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventResultListResponseBody(name='body'),
}

/**
 * @summary 事件概览列表
 *
 * @param request DescribeEventResultListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventResultListResponse
 */
async function describeEventResultListWithOptions(request: DescribeEventResultListRequest, runtime: Util.RuntimeOptions): DescribeEventResultListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventResultList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 事件概览列表
 *
 * @param request DescribeEventResultListRequest
 * @return DescribeEventResultListResponse
 */
async function describeEventResultList(request: DescribeEventResultListRequest): DescribeEventResultListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventResultListWithOptions(request, runtime);
}

model DescribeEventTaskHistoryRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeEventTaskHistoryResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      taskCode?: string(name='taskCode'),
      taskName?: string(name='taskName'),
      taskStatus?: string(name='taskStatus'),
      url?: string(name='url'),
    }
  ](name='resultObject'),
}

model DescribeEventTaskHistoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventTaskHistoryResponseBody(name='body'),
}

/**
 * @summary 查询策略下载列表
 *
 * @param request DescribeEventTaskHistoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventTaskHistoryResponse
 */
async function describeEventTaskHistoryWithOptions(request: DescribeEventTaskHistoryRequest, runtime: Util.RuntimeOptions): DescribeEventTaskHistoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventTaskHistory',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询策略下载列表
 *
 * @param request DescribeEventTaskHistoryRequest
 * @return DescribeEventTaskHistoryResponse
 */
async function describeEventTaskHistory(request: DescribeEventTaskHistoryRequest): DescribeEventTaskHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventTaskHistoryWithOptions(request, runtime);
}

model DescribeEventTotalCountReportRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeEventTotalCountReportResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    ratio?: string(name='ratio'),
    value?: string(name='value'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeEventTotalCountReportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventTotalCountReportResponseBody(name='body'),
}

/**
 * @summary 调用事件次数
 *
 * @param request DescribeEventTotalCountReportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventTotalCountReportResponse
 */
async function describeEventTotalCountReportWithOptions(request: DescribeEventTotalCountReportRequest, runtime: Util.RuntimeOptions): DescribeEventTotalCountReportResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventTotalCountReport',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用事件次数
 *
 * @param request DescribeEventTotalCountReportRequest
 * @return DescribeEventTotalCountReportResponse
 */
async function describeEventTotalCountReport(request: DescribeEventTotalCountReportRequest): DescribeEventTotalCountReportResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventTotalCountReportWithOptions(request, runtime);
}

model DescribeEventUploadPolicyRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeEventUploadPolicyResponseBody = {
  accessId?: string(name='AccessId'),
  host?: string(name='Host'),
  key?: string(name='Key'),
  policy?: string(name='Policy'),
  requestId?: string(name='RequestId'),
  signature?: string(name='Signature'),
  stsToken?: string(name='StsToken'),
}

model DescribeEventUploadPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventUploadPolicyResponseBody(name='body'),
}

/**
 * @summary 批量导入策略
 *
 * @param request DescribeEventUploadPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventUploadPolicyResponse
 */
async function describeEventUploadPolicyWithOptions(request: DescribeEventUploadPolicyRequest, runtime: Util.RuntimeOptions): DescribeEventUploadPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventUploadPolicy',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量导入策略
 *
 * @param request DescribeEventUploadPolicyRequest
 * @return DescribeEventUploadPolicyResponse
 */
async function describeEventUploadPolicy(request: DescribeEventUploadPolicyRequest): DescribeEventUploadPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventUploadPolicyWithOptions(request, runtime);
}

model DescribeEventVariableListRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  filterDTO?: string(name='filterDTO'),
  refObjId?: string(name='refObjId', description='This parameter is required.'),
  refObjType?: string(name='refObjType', description='This parameter is required.'),
  regId?: string(name='regId'),
  type?: string(name='type'),
}

model DescribeEventVariableListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    actions?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='actions'),
    deviceVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='deviceVariables'),
    expressionVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='expressionVariables'),
    favoriteVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='favoriteVariables'),
    middleVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='middleVariables'),
    modelVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='modelVariables'),
    nameList?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='nameList'),
    nativeVariableFunctions?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='nativeVariableFunctions'),
    nativeVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='nativeVariables'),
    queryVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='queryVariables'),
    selfVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='selfVariables'),
    sysVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='sysVariables'),
    thirdVariables?: map[string]any(name='thirdVariables'),
    velocityVariables?: [ 
      {
        code?: string(name='code'),
        dataDisplay?: string(name='dataDisplay'),
        defineId?: string(name='defineId'),
        description?: string(name='description'),
        displayType?: string(name='displayType'),
        expressionTitle?: string(name='expressionTitle'),
        favoriteFlag?: boolean(name='favoriteFlag'),
        fieldDetail?: string(name='fieldDetail'),
        fieldRank?: int32(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        inputFieldType?: string(name='inputFieldType'),
        inputRequired?: string(name='inputRequired'),
        inputs?: string(name='inputs'),
        name?: string(name='name'),
        outlier?: string(name='outlier'),
        outputThreshold?: {
          maxValue?: double(name='maxValue'),
          minValue?: double(name='minValue'),
        }(name='outputThreshold'),
        parentName?: string(name='parentName'),
        sourceType?: string(name='sourceType'),
        title?: string(name='title'),
        type?: string(name='type'),
        variableVelocity?: {
          iv?: string(name='iv'),
        }(name='variableVelocity'),
        xLabel?: string(name='xLabel'),
        yLabel?: string(name='yLabel'),
      }
    ](name='velocityVariables'),
  }(name='resultObject'),
}

model DescribeEventVariableListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventVariableListResponseBody(name='body'),
}

/**
 * @summary 查询事件变量
 *
 * @param request DescribeEventVariableListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventVariableListResponse
 */
async function describeEventVariableListWithOptions(request: DescribeEventVariableListRequest, runtime: Util.RuntimeOptions): DescribeEventVariableListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.filterDTO)) {
    query['filterDTO'] = request.filterDTO;
  }
  if (!Util.isUnset(request.refObjId)) {
    query['refObjId'] = request.refObjId;
  }
  if (!Util.isUnset(request.refObjType)) {
    query['refObjType'] = request.refObjType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventVariableList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件变量
 *
 * @param request DescribeEventVariableListRequest
 * @return DescribeEventVariableListResponse
 */
async function describeEventVariableList(request: DescribeEventVariableListRequest): DescribeEventVariableListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventVariableListWithOptions(request, runtime);
}

model DescribeEventVariableTemplateBindRequest {
  lang?: string(name='Lang'),
  inputs?: string(name='inputs', description='This parameter is required.'),
  regId?: string(name='regId'),
  templateCode?: string(name='templateCode'),
  type?: string(name='type', description='This parameter is required.'),
}

model DescribeEventVariableTemplateBindResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    chargeVariables?: [ 
      {
        code?: string(name='code'),
        description?: string(name='description'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        name?: string(name='name'),
        title?: string(name='title'),
        type?: string(name='type'),
      }
    ](name='chargeVariables'),
    freeVariables?: [ 
      {
        code?: string(name='code'),
        description?: string(name='description'),
        fieldType?: string(name='fieldType'),
        id?: long(name='id'),
        name?: string(name='name'),
        title?: string(name='title'),
        type?: string(name='type'),
      }
    ](name='freeVariables'),
    templateCode?: string(name='templateCode'),
    totalCount?: string(name='totalCount'),
  }(name='resultObject'),
}

model DescribeEventVariableTemplateBindResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventVariableTemplateBindResponseBody(name='body'),
}

/**
 * @summary 查询事件模版
 *
 * @param request DescribeEventVariableTemplateBindRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventVariableTemplateBindResponse
 */
async function describeEventVariableTemplateBindWithOptions(request: DescribeEventVariableTemplateBindRequest, runtime: Util.RuntimeOptions): DescribeEventVariableTemplateBindResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.inputs)) {
    query['inputs'] = request.inputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateCode)) {
    query['templateCode'] = request.templateCode;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventVariableTemplateBind',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件模版
 *
 * @param request DescribeEventVariableTemplateBindRequest
 * @return DescribeEventVariableTemplateBindResponse
 */
async function describeEventVariableTemplateBind(request: DescribeEventVariableTemplateBindRequest): DescribeEventVariableTemplateBindResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventVariableTemplateBindWithOptions(request, runtime);
}

model DescribeEventVariableTemplateListRequest {
  lang?: string(name='Lang'),
  inputs?: string(name='inputs'),
  regId?: string(name='regId'),
  templateCode?: string(name='templateCode'),
  type?: string(name='type'),
}

model DescribeEventVariableTemplateListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      templateCode?: string(name='templateCode'),
      templateName?: string(name='templateName'),
      variables?: [ 
        {
          code?: string(name='code'),
          description?: string(name='description'),
          fieldType?: string(name='fieldType'),
          id?: long(name='id'),
          name?: string(name='name'),
          title?: string(name='title'),
          type?: string(name='type'),
        }
      ](name='variables'),
    }
  ](name='resultObject'),
}

model DescribeEventVariableTemplateListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventVariableTemplateListResponseBody(name='body'),
}

/**
 * @summary 查询事件模版
 *
 * @param request DescribeEventVariableTemplateListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventVariableTemplateListResponse
 */
async function describeEventVariableTemplateListWithOptions(request: DescribeEventVariableTemplateListRequest, runtime: Util.RuntimeOptions): DescribeEventVariableTemplateListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.inputs)) {
    query['inputs'] = request.inputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateCode)) {
    query['templateCode'] = request.templateCode;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventVariableTemplateList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件模版
 *
 * @param request DescribeEventVariableTemplateListRequest
 * @return DescribeEventVariableTemplateListResponse
 */
async function describeEventVariableTemplateList(request: DescribeEventVariableTemplateListRequest): DescribeEventVariableTemplateListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventVariableTemplateListWithOptions(request, runtime);
}

model DescribeEventsVariableListRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  filterDTO?: string(name='filterDTO'),
  regId?: string(name='regId'),
  scene?: string(name='scene', description='This parameter is required.'),
}

model DescribeEventsVariableListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeEventsVariableListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventsVariableListResponseBody(name='body'),
}

/**
 * @summary 查询事件变量
 *
 * @param request DescribeEventsVariableListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventsVariableListResponse
 */
async function describeEventsVariableListWithOptions(request: DescribeEventsVariableListRequest, runtime: Util.RuntimeOptions): DescribeEventsVariableListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.filterDTO)) {
    query['filterDTO'] = request.filterDTO;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventsVariableList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件变量
 *
 * @param request DescribeEventsVariableListRequest
 * @return DescribeEventsVariableListResponse
 */
async function describeEventsVariableList(request: DescribeEventsVariableListRequest): DescribeEventsVariableListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEventsVariableListWithOptions(request, runtime);
}

model DescribeExcuteNumRequest {
  code?: string(name='Code', description='This parameter is required.'),
  degree?: string(name='Degree'),
  endDate?: string(name='EndDate'),
  lang?: string(name='Lang'),
  sourceIp?: string(name='SourceIp'),
  startDate?: string(name='StartDate'),
}

model DescribeExcuteNumResponseBody = {
  categories?: [ string ](name='Categories'),
  data?: [ string ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeExcuteNumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExcuteNumResponseBody(name='body'),
}

/**
 * @param request DescribeExcuteNumRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExcuteNumResponse
 */
async function describeExcuteNumWithOptions(request: DescribeExcuteNumRequest, runtime: Util.RuntimeOptions): DescribeExcuteNumResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.code)) {
    query['Code'] = request.code;
  }
  if (!Util.isUnset(request.degree)) {
    query['Degree'] = request.degree;
  }
  if (!Util.isUnset(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.sourceIp)) {
    query['SourceIp'] = request.sourceIp;
  }
  if (!Util.isUnset(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeExcuteNum',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeExcuteNumRequest
 * @return DescribeExcuteNumResponse
 */
async function describeExcuteNum(request: DescribeExcuteNumRequest): DescribeExcuteNumResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeExcuteNumWithOptions(request, runtime);
}

model DescribeExistNameRequest {
  lang?: string(name='Lang'),
  name?: string(name='name'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeExistNameResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeExistNameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExistNameResponseBody(name='body'),
}

/**
 * @summary 校验字段名是否重复(基于用户单位)
 *
 * @param request DescribeExistNameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExistNameResponse
 */
async function describeExistNameWithOptions(request: DescribeExistNameRequest, runtime: Util.RuntimeOptions): DescribeExistNameResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeExistName',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 校验字段名是否重复(基于用户单位)
 *
 * @param request DescribeExistNameRequest
 * @return DescribeExistNameResponse
 */
async function describeExistName(request: DescribeExistNameRequest): DescribeExistNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeExistNameWithOptions(request, runtime);
}

model DescribeExistSceneRequest {
  lang?: string(name='Lang'),
  sceneName?: string(name='SceneName'),
  regId?: string(name='regId'),
}

model DescribeExistSceneResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model DescribeExistSceneResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExistSceneResponseBody(name='body'),
}

/**
 * @summary 场景是否存在
 *
 * @param request DescribeExistSceneRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExistSceneResponse
 */
async function describeExistSceneWithOptions(request: DescribeExistSceneRequest, runtime: Util.RuntimeOptions): DescribeExistSceneResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.sceneName)) {
    query['SceneName'] = request.sceneName;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeExistScene',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 场景是否存在
 *
 * @param request DescribeExistSceneRequest
 * @return DescribeExistSceneResponse
 */
async function describeExistScene(request: DescribeExistSceneRequest): DescribeExistSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeExistSceneWithOptions(request, runtime);
}

model DescribeExpressionVariableDetailRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeExpressionVariableDetailResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: map[string]any(name='resultObject'),
}

model DescribeExpressionVariableDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressionVariableDetailResponseBody(name='body'),
}

/**
 * @summary 自定义变量详情
 *
 * @param request DescribeExpressionVariableDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressionVariableDetailResponse
 */
async function describeExpressionVariableDetailWithOptions(request: DescribeExpressionVariableDetailRequest, runtime: Util.RuntimeOptions): DescribeExpressionVariableDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeExpressionVariableDetail',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 自定义变量详情
 *
 * @param request DescribeExpressionVariableDetailRequest
 * @return DescribeExpressionVariableDetailResponse
 */
async function describeExpressionVariableDetail(request: DescribeExpressionVariableDetailRequest): DescribeExpressionVariableDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeExpressionVariableDetailWithOptions(request, runtime);
}

model DescribeExpressionVariableFunctionListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeExpressionVariableFunctionListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      description?: string(name='description'),
      key?: string(name='key'),
      maxParamSize?: long(name='maxParamSize'),
      minParamSize?: long(name='minParamSize'),
      paramTypes?: string(name='paramTypes'),
      redirect?: boolean(name='redirect'),
      returnTypes?: string(name='returnTypes'),
      value?: string(name='value'),
    }
  ](name='resultObject'),
}

model DescribeExpressionVariableFunctionListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressionVariableFunctionListResponseBody(name='body'),
}

/**
 * @summary 函数列表
 *
 * @param request DescribeExpressionVariableFunctionListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressionVariableFunctionListResponse
 */
async function describeExpressionVariableFunctionListWithOptions(request: DescribeExpressionVariableFunctionListRequest, runtime: Util.RuntimeOptions): DescribeExpressionVariableFunctionListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeExpressionVariableFunctionList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 函数列表
 *
 * @param request DescribeExpressionVariableFunctionListRequest
 * @return DescribeExpressionVariableFunctionListResponse
 */
async function describeExpressionVariableFunctionList(request: DescribeExpressionVariableFunctionListRequest): DescribeExpressionVariableFunctionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeExpressionVariableFunctionListWithOptions(request, runtime);
}

model DescribeExpressionVariablePageRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage', description='This parameter is required.'),
  eventCode?: string(name='eventCode'),
  outputs?: string(name='outputs'),
  pageSize?: string(name='pageSize', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  status?: string(name='status'),
  value?: string(name='value'),
}

model DescribeExpressionVariablePageResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      description?: string(name='description'),
      eventName?: string(name='eventName'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      outputs?: string(name='outputs'),
      status?: string(name='status'),
      title?: string(name='title'),
      version?: long(name='version'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeExpressionVariablePageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressionVariablePageResponseBody(name='body'),
}

/**
 * @summary 自定义变量分页查询
 *
 * @param request DescribeExpressionVariablePageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressionVariablePageResponse
 */
async function describeExpressionVariablePageWithOptions(request: DescribeExpressionVariablePageRequest, runtime: Util.RuntimeOptions): DescribeExpressionVariablePageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.outputs)) {
    query['outputs'] = request.outputs;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  if (!Util.isUnset(request.value)) {
    query['value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeExpressionVariablePage',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 自定义变量分页查询
 *
 * @param request DescribeExpressionVariablePageRequest
 * @return DescribeExpressionVariablePageResponse
 */
async function describeExpressionVariablePage(request: DescribeExpressionVariablePageRequest): DescribeExpressionVariablePageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeExpressionVariablePageWithOptions(request, runtime);
}

model DescribeFieldByIdRequest {
  lang?: string(name='Lang'),
  id?: long(name='id'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeFieldByIdResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeFieldByIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFieldByIdResponseBody(name='body'),
}

/**
 * @summary 获取字段详情
 *
 * @param request DescribeFieldByIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFieldByIdResponse
 */
async function describeFieldByIdWithOptions(request: DescribeFieldByIdRequest, runtime: Util.RuntimeOptions): DescribeFieldByIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFieldById',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取字段详情
 *
 * @param request DescribeFieldByIdRequest
 * @return DescribeFieldByIdResponse
 */
async function describeFieldById(request: DescribeFieldByIdRequest): DescribeFieldByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFieldByIdWithOptions(request, runtime);
}

model DescribeFieldListRequest {
  lang?: string(name='Lang'),
  condition?: string(name='condition'),
  inputs?: string(name='inputs'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeFieldListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      classify?: string(name='classify'),
      description?: string(name='description'),
      enumData?: string(name='enumData'),
      id?: long(name='id'),
      name?: string(name='name'),
      source?: string(name='source'),
      status?: string(name='status'),
      title?: string(name='title'),
      type?: string(name='type'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeFieldListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFieldListResponseBody(name='body'),
}

/**
 * @summary 查询字段列表
 *
 * @param request DescribeFieldListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFieldListResponse
 */
async function describeFieldListWithOptions(request: DescribeFieldListRequest, runtime: Util.RuntimeOptions): DescribeFieldListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.condition)) {
    query['condition'] = request.condition;
  }
  if (!Util.isUnset(request.inputs)) {
    query['inputs'] = request.inputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFieldList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询字段列表
 *
 * @param request DescribeFieldListRequest
 * @return DescribeFieldListResponse
 */
async function describeFieldList(request: DescribeFieldListRequest): DescribeFieldListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFieldListWithOptions(request, runtime);
}

model DescribeFieldPageRequest {
  lang?: string(name='Lang'),
  classify?: string(name='classify'),
  condition?: string(name='condition'),
  currentPage?: string(name='currentPage'),
  name?: string(name='name'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  source?: string(name='source'),
  status?: string(name='status'),
  title?: string(name='title'),
  type?: string(name='type'),
}

model DescribeFieldPageResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      classify?: string(name='classify'),
      description?: string(name='description'),
      enumData?: string(name='enumData'),
      id?: long(name='id'),
      name?: string(name='name'),
      source?: string(name='source'),
      status?: string(name='status'),
      title?: string(name='title'),
      type?: string(name='type'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeFieldPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFieldPageResponseBody(name='body'),
}

/**
 * @summary 查询字段分页列表
 *
 * @param request DescribeFieldPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFieldPageResponse
 */
async function describeFieldPageWithOptions(request: DescribeFieldPageRequest, runtime: Util.RuntimeOptions): DescribeFieldPageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.classify)) {
    query['classify'] = request.classify;
  }
  if (!Util.isUnset(request.condition)) {
    query['condition'] = request.condition;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFieldPage',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询字段分页列表
 *
 * @param request DescribeFieldPageRequest
 * @return DescribeFieldPageResponse
 */
async function describeFieldPage(request: DescribeFieldPageRequest): DescribeFieldPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFieldPageWithOptions(request, runtime);
}

model DescribeGroupAccountPageRequest {
  lang?: string(name='Lang'),
  communityNo?: string(name='communityNo'),
  currentPage?: string(name='currentPage'),
  direction?: string(name='direction'),
  fieldKey?: string(name='fieldKey'),
  fieldVal?: string(name='fieldVal'),
  isPage?: boolean(name='isPage'),
  order?: string(name='order'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  taskId?: string(name='taskId'),
}

model DescribeGroupAccountPageResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  data?: boolean(name='data'),
  pageSize?: int32(name='pageSize'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeGroupAccountPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupAccountPageResponseBody(name='body'),
}

/**
 * @summary 社群账户列表
 *
 * @param request DescribeGroupAccountPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupAccountPageResponse
 */
async function describeGroupAccountPageWithOptions(request: DescribeGroupAccountPageRequest, runtime: Util.RuntimeOptions): DescribeGroupAccountPageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.communityNo)) {
    query['communityNo'] = request.communityNo;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.direction)) {
    query['direction'] = request.direction;
  }
  if (!Util.isUnset(request.fieldKey)) {
    query['fieldKey'] = request.fieldKey;
  }
  if (!Util.isUnset(request.fieldVal)) {
    query['fieldVal'] = request.fieldVal;
  }
  if (!Util.isUnset(request.isPage)) {
    query['isPage'] = request.isPage;
  }
  if (!Util.isUnset(request.order)) {
    query['order'] = request.order;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['taskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupAccountPage',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 社群账户列表
 *
 * @param request DescribeGroupAccountPageRequest
 * @return DescribeGroupAccountPageResponse
 */
async function describeGroupAccountPage(request: DescribeGroupAccountPageRequest): DescribeGroupAccountPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupAccountPageWithOptions(request, runtime);
}

model DescribeGroupConditionListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeGroupConditionListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      fieldKey?: string(name='fieldKey'),
      fieldValue?: string(name='fieldValue'),
    }
  ](name='resultObject'),
}

model DescribeGroupConditionListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupConditionListResponseBody(name='body'),
}

/**
 * @summary 社群列表查询条件
 *
 * @param request DescribeGroupConditionListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupConditionListResponse
 */
async function describeGroupConditionListWithOptions(request: DescribeGroupConditionListRequest, runtime: Util.RuntimeOptions): DescribeGroupConditionListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupConditionList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 社群列表查询条件
 *
 * @param request DescribeGroupConditionListRequest
 * @return DescribeGroupConditionListResponse
 */
async function describeGroupConditionList(request: DescribeGroupConditionListRequest): DescribeGroupConditionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupConditionListWithOptions(request, runtime);
}

model DescribeGroupPageRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage'),
  direction?: string(name='direction'),
  order?: string(name='order'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  taskId?: string(name='taskId'),
  timeType?: string(name='timeType'),
}

model DescribeGroupPageResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      communityNo?: string(name='communityNo'),
      createTime?: long(name='createTime'),
      groupRisk?: string(name='groupRisk'),
      groupScale?: string(name='groupScale'),
      id?: long(name='id'),
      sceneName?: string(name='sceneName'),
      taskId?: long(name='taskId'),
      userId?: string(name='userId'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeGroupPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupPageResponseBody(name='body'),
}

/**
 * @summary 社群列表
 *
 * @param request DescribeGroupPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupPageResponse
 */
async function describeGroupPageWithOptions(request: DescribeGroupPageRequest, runtime: Util.RuntimeOptions): DescribeGroupPageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.direction)) {
    query['direction'] = request.direction;
  }
  if (!Util.isUnset(request.order)) {
    query['order'] = request.order;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['taskId'] = request.taskId;
  }
  if (!Util.isUnset(request.timeType)) {
    query['timeType'] = request.timeType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupPage',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 社群列表
 *
 * @param request DescribeGroupPageRequest
 * @return DescribeGroupPageResponse
 */
async function describeGroupPage(request: DescribeGroupPageRequest): DescribeGroupPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupPageWithOptions(request, runtime);
}

model DescribeGroupStatisticsByTodayRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeGroupStatisticsByTodayResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model DescribeGroupStatisticsByTodayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupStatisticsByTodayResponseBody(name='body'),
}

/**
 * @summary 当日发现的风险社群
 *
 * @param request DescribeGroupStatisticsByTodayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupStatisticsByTodayResponse
 */
async function describeGroupStatisticsByTodayWithOptions(request: DescribeGroupStatisticsByTodayRequest, runtime: Util.RuntimeOptions): DescribeGroupStatisticsByTodayResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupStatisticsByToday',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 当日发现的风险社群
 *
 * @param request DescribeGroupStatisticsByTodayRequest
 * @return DescribeGroupStatisticsByTodayResponse
 */
async function describeGroupStatisticsByToday(request: DescribeGroupStatisticsByTodayRequest): DescribeGroupStatisticsByTodayResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupStatisticsByTodayWithOptions(request, runtime);
}

model DescribeGroupTrendRequest {
  lang?: string(name='Lang'),
  day?: string(name='day'),
  regId?: string(name='regId'),
}

model DescribeGroupTrendResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model DescribeGroupTrendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupTrendResponseBody(name='body'),
}

/**
 * @summary 风险社群的近期趋势
 *
 * @param request DescribeGroupTrendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupTrendResponse
 */
async function describeGroupTrendWithOptions(request: DescribeGroupTrendRequest, runtime: Util.RuntimeOptions): DescribeGroupTrendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.day)) {
    query['day'] = request.day;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGroupTrend',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 风险社群的近期趋势
 *
 * @param request DescribeGroupTrendRequest
 * @return DescribeGroupTrendResponse
 */
async function describeGroupTrend(request: DescribeGroupTrendRequest): DescribeGroupTrendResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGroupTrendWithOptions(request, runtime);
}

model DescribeHasRuleNameByEventCodeRequest {
  lang?: string(name='Lang'),
  eventCode?: string(name='eventCode'),
  excludeRuleId?: string(name='excludeRuleId'),
  regId?: string(name='regId'),
  ruleName?: string(name='ruleName'),
}

model DescribeHasRuleNameByEventCodeResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeHasRuleNameByEventCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHasRuleNameByEventCodeResponseBody(name='body'),
}

/**
 * @summary 查询事件名下的策略名是否存在
 *
 * @param request DescribeHasRuleNameByEventCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeHasRuleNameByEventCodeResponse
 */
async function describeHasRuleNameByEventCodeWithOptions(request: DescribeHasRuleNameByEventCodeRequest, runtime: Util.RuntimeOptions): DescribeHasRuleNameByEventCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.excludeRuleId)) {
    query['excludeRuleId'] = request.excludeRuleId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHasRuleNameByEventCode',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件名下的策略名是否存在
 *
 * @param request DescribeHasRuleNameByEventCodeRequest
 * @return DescribeHasRuleNameByEventCodeResponse
 */
async function describeHasRuleNameByEventCode(request: DescribeHasRuleNameByEventCodeRequest): DescribeHasRuleNameByEventCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHasRuleNameByEventCodeWithOptions(request, runtime);
}

model DescribeHighRiskPieChartRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime', description='This parameter is required.'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
}

model DescribeHighRiskPieChartResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    highRiskIPCity?: {
      animation?: boolean(name='animation'),
      grid?: {
        show?: boolean(name='show'),
      }(name='grid'),
      series?: [ 
        {
          data?: [ 
            {
              name?: string(name='name'),
              value?: string(name='value'),
            }
          ](name='data'),
          name?: string(name='name'),
          roseType?: string(name='roseType'),
        }
      ](name='series'),
    }(name='highRiskIPCity'),
    highRiskIPProvince?: {
      animation?: boolean(name='animation'),
      grid?: {
        show?: boolean(name='show'),
      }(name='grid'),
      series?: [ 
        {
          data?: [ 
            {
              name?: string(name='name'),
              value?: string(name='value'),
            }
          ](name='data'),
          name?: string(name='name'),
          roseType?: string(name='roseType'),
        }
      ](name='series'),
    }(name='highRiskIPProvince'),
    highRiskMobileCity?: {
      animation?: boolean(name='animation'),
      grid?: {
        show?: boolean(name='show'),
      }(name='grid'),
      series?: [ 
        {
          data?: [ 
            {
              name?: string(name='name'),
              value?: string(name='value'),
            }
          ](name='data'),
          name?: string(name='name'),
          roseType?: string(name='roseType'),
        }
      ](name='series'),
    }(name='highRiskMobileCity'),
    highRiskMobileProvince?: {
      animation?: boolean(name='animation'),
      grid?: {
        show?: boolean(name='show'),
      }(name='grid'),
      series?: [ 
        {
          data?: [ 
            {
              name?: string(name='name'),
              value?: string(name='value'),
            }
          ](name='data'),
          name?: string(name='name'),
          roseType?: string(name='roseType'),
        }
      ](name='series'),
    }(name='highRiskMobileProvince'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeHighRiskPieChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHighRiskPieChartResponseBody(name='body'),
}

/**
 * @summary 风险地图概览图表(饼图)
 *
 * @param request DescribeHighRiskPieChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeHighRiskPieChartResponse
 */
async function describeHighRiskPieChartWithOptions(request: DescribeHighRiskPieChartRequest, runtime: Util.RuntimeOptions): DescribeHighRiskPieChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHighRiskPieChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 风险地图概览图表(饼图)
 *
 * @param request DescribeHighRiskPieChartRequest
 * @return DescribeHighRiskPieChartResponse
 */
async function describeHighRiskPieChart(request: DescribeHighRiskPieChartRequest): DescribeHighRiskPieChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHighRiskPieChartWithOptions(request, runtime);
}

model DescribeHitRuleFluctuationRequest {
  lang?: string(name='Lang'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
  ruleStatus?: string(name='ruleStatus'),
}

model DescribeHitRuleFluctuationResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      ruleId?: string(name='ruleId'),
      ruleName?: string(name='ruleName'),
      todayNum?: long(name='todayNum'),
      withinSevenDayNum?: string(name='withinSevenDayNum'),
      withinThirtyDayNum?: string(name='withinThirtyDayNum'),
      withinThreeDayNum?: string(name='withinThreeDayNum'),
      yesterdayNum?: long(name='yesterdayNum'),
    }
  ](name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeHitRuleFluctuationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHitRuleFluctuationResponseBody(name='body'),
}

/**
 * @summary 策略命中波动检测
 *
 * @param request DescribeHitRuleFluctuationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeHitRuleFluctuationResponse
 */
async function describeHitRuleFluctuationWithOptions(request: DescribeHitRuleFluctuationRequest, runtime: Util.RuntimeOptions): DescribeHitRuleFluctuationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleStatus)) {
    query['ruleStatus'] = request.ruleStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHitRuleFluctuation',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 策略命中波动检测
 *
 * @param request DescribeHitRuleFluctuationRequest
 * @return DescribeHitRuleFluctuationResponse
 */
async function describeHitRuleFluctuation(request: DescribeHitRuleFluctuationRequest): DescribeHitRuleFluctuationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHitRuleFluctuationWithOptions(request, runtime);
}

model DescribeHitRuleListRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime'),
  endTime?: long(name='endTime'),
  eventCodes?: string(name='eventCodes'),
  eventType?: string(name='eventType'),
  regId?: string(name='regId'),
}

model DescribeHitRuleListResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      hitCount?: int32(name='hitCount'),
      ruleName?: string(name='ruleName'),
    }
  ](name='resultObject'),
}

model DescribeHitRuleListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHitRuleListResponseBody(name='body'),
}

/**
 * @summary 主事件/旁路/分流策略命中TOP20
 *
 * @param request DescribeHitRuleListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeHitRuleListResponse
 */
async function describeHitRuleListWithOptions(request: DescribeHitRuleListRequest, runtime: Util.RuntimeOptions): DescribeHitRuleListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.eventType)) {
    query['eventType'] = request.eventType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHitRuleList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 主事件/旁路/分流策略命中TOP20
 *
 * @param request DescribeHitRuleListRequest
 * @return DescribeHitRuleListResponse
 */
async function describeHitRuleList(request: DescribeHitRuleListRequest): DescribeHitRuleListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHitRuleListWithOptions(request, runtime);
}

model DescribeHitRuleTrendRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime'),
  endTime?: long(name='endTime'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
  ruleStatus?: string(name='ruleStatus'),
}

model DescribeHitRuleTrendResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ 
          {
            num?: long(name='num'),
            scale?: string(name='scale'),
          }
        ](name='data'),
        name?: string(name='name'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeHitRuleTrendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHitRuleTrendResponseBody(name='body'),
}

/**
 * @summary 策略命中趋势
 *
 * @param request DescribeHitRuleTrendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeHitRuleTrendResponse
 */
async function describeHitRuleTrendWithOptions(request: DescribeHitRuleTrendRequest, runtime: Util.RuntimeOptions): DescribeHitRuleTrendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleStatus)) {
    query['ruleStatus'] = request.ruleStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHitRuleTrend',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 策略命中趋势
 *
 * @param request DescribeHitRuleTrendRequest
 * @return DescribeHitRuleTrendResponse
 */
async function describeHitRuleTrend(request: DescribeHitRuleTrendRequest): DescribeHitRuleTrendResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHitRuleTrendWithOptions(request, runtime);
}

model DescribeInputFeildCountByEventCodeRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  regId?: string(name='regId'),
}

model DescribeInputFeildCountByEventCodeResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    limit?: boolean(name='limit'),
    maxTotalItem?: int32(name='maxTotalItem'),
    totalItem?: int32(name='totalItem'),
  }(name='resultObject'),
}

model DescribeInputFeildCountByEventCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInputFeildCountByEventCodeResponseBody(name='body'),
}

/**
 * @summary 查询事件总数量
 *
 * @param request DescribeInputFeildCountByEventCodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInputFeildCountByEventCodeResponse
 */
async function describeInputFeildCountByEventCodeWithOptions(request: DescribeInputFeildCountByEventCodeRequest, runtime: Util.RuntimeOptions): DescribeInputFeildCountByEventCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInputFeildCountByEventCode',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件总数量
 *
 * @param request DescribeInputFeildCountByEventCodeRequest
 * @return DescribeInputFeildCountByEventCodeResponse
 */
async function describeInputFeildCountByEventCode(request: DescribeInputFeildCountByEventCodeRequest): DescribeInputFeildCountByEventCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInputFeildCountByEventCodeWithOptions(request, runtime);
}

model DescribeListPocRequest {
  currentPage?: long(name='CurrentPage'),
  lang?: string(name='Lang'),
  pageSize?: long(name='PageSize'),
  regId?: string(name='RegId'),
  type?: string(name='Type'),
}

model DescribeListPocResponseBody = {
  code?: string(name='Code'),
  currentPage?: string(name='CurrentPage'),
  httpStatusCode?: string(name='HttpStatusCode'),
  message?: string(name='Message'),
  pageSize?: string(name='PageSize'),
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='ResultObject'),
  totalItem?: string(name='TotalItem'),
  totalPage?: string(name='TotalPage'),
}

model DescribeListPocResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeListPocResponseBody(name='body'),
}

/**
 * @summary 任务列表
 *
 * @param request DescribeListPocRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeListPocResponse
 */
async function describeListPocWithOptions(request: DescribeListPocRequest, runtime: Util.RuntimeOptions): DescribeListPocResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['RegId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeListPoc',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 任务列表
 *
 * @param request DescribeListPocRequest
 * @return DescribeListPocResponse
 */
async function describeListPoc(request: DescribeListPocRequest): DescribeListPocResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeListPocWithOptions(request, runtime);
}

model DescribeLoanExecListRequest {
  lang?: string(name='Lang'),
  batchNo?: string(name='batchNo'),
  currentPage?: string(name='currentPage'),
  monitorObj?: string(name='monitorObj'),
  monitorStatus?: string(name='monitorStatus'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
}

model DescribeLoanExecListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: boolean(name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeLoanExecListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoanExecListResponseBody(name='body'),
}

/**
 * @summary 获取监控对象列表
 *
 * @param request DescribeLoanExecListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoanExecListResponse
 */
async function describeLoanExecListWithOptions(request: DescribeLoanExecListRequest, runtime: Util.RuntimeOptions): DescribeLoanExecListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.batchNo)) {
    query['batchNo'] = request.batchNo;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.monitorObj)) {
    query['monitorObj'] = request.monitorObj;
  }
  if (!Util.isUnset(request.monitorStatus)) {
    query['monitorStatus'] = request.monitorStatus;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoanExecList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取监控对象列表
 *
 * @param request DescribeLoanExecListRequest
 * @return DescribeLoanExecListResponse
 */
async function describeLoanExecList(request: DescribeLoanExecListRequest): DescribeLoanExecListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoanExecListWithOptions(request, runtime);
}

model DescribeLoanTaskListRequest {
  lang?: string(name='Lang'),
  batchNo?: string(name='batchNo'),
  currentPage?: string(name='currentPage'),
  monitorStatus?: string(name='monitorStatus'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
}

model DescribeLoanTaskListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: boolean(name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeLoanTaskListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoanTaskListResponseBody(name='body'),
}

/**
 * @summary 获取贷中监控任务列表
 *
 * @param request DescribeLoanTaskListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoanTaskListResponse
 */
async function describeLoanTaskListWithOptions(request: DescribeLoanTaskListRequest, runtime: Util.RuntimeOptions): DescribeLoanTaskListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.batchNo)) {
    query['batchNo'] = request.batchNo;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.monitorStatus)) {
    query['monitorStatus'] = request.monitorStatus;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoanTaskList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取贷中监控任务列表
 *
 * @param request DescribeLoanTaskListRequest
 * @return DescribeLoanTaskListResponse
 */
async function describeLoanTaskList(request: DescribeLoanTaskListRequest): DescribeLoanTaskListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoanTaskListWithOptions(request, runtime);
}

model DescribeMarkPageRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage'),
  direction?: string(name='direction'),
  isPage?: boolean(name='isPage'),
  order?: string(name='order'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  taskLogId?: string(name='taskLogId'),
}

model DescribeMarkPageResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      fieldName?: string(name='fieldName'),
      fieldValue?: string(name='fieldValue'),
      id?: long(name='id'),
      markType?: string(name='markType'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeMarkPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMarkPageResponseBody(name='body'),
}

/**
 * @summary 打标列表
 *
 * @param request DescribeMarkPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMarkPageResponse
 */
async function describeMarkPageWithOptions(request: DescribeMarkPageRequest, runtime: Util.RuntimeOptions): DescribeMarkPageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.direction)) {
    query['direction'] = request.direction;
  }
  if (!Util.isUnset(request.isPage)) {
    query['isPage'] = request.isPage;
  }
  if (!Util.isUnset(request.order)) {
    query['order'] = request.order;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.taskLogId)) {
    query['taskLogId'] = request.taskLogId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMarkPage',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 打标列表
 *
 * @param request DescribeMarkPageRequest
 * @return DescribeMarkPageResponse
 */
async function describeMarkPage(request: DescribeMarkPageRequest): DescribeMarkPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMarkPageWithOptions(request, runtime);
}

model DescribeMenuPermissionRequest {
  lang?: string(name='Lang'),
  permissionType?: string(name='permissionType'),
  regId?: string(name='regId'),
}

model DescribeMenuPermissionResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeMenuPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMenuPermissionResponseBody(name='body'),
}

/**
 * @summary 查询是否有权限
 *
 * @param request DescribeMenuPermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMenuPermissionResponse
 */
async function describeMenuPermissionWithOptions(request: DescribeMenuPermissionRequest, runtime: Util.RuntimeOptions): DescribeMenuPermissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.permissionType)) {
    query['permissionType'] = request.permissionType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMenuPermission',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询是否有权限
 *
 * @param request DescribeMenuPermissionRequest
 * @return DescribeMenuPermissionResponse
 */
async function describeMenuPermission(request: DescribeMenuPermissionRequest): DescribeMenuPermissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMenuPermissionWithOptions(request, runtime);
}

model DescribeMonitorTaskLimitRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeMonitorTaskLimitResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    limit?: boolean(name='limit'),
    maxTotalItem?: int32(name='maxTotalItem'),
    totalItem?: int32(name='totalItem'),
  }(name='resultObject'),
}

model DescribeMonitorTaskLimitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMonitorTaskLimitResponseBody(name='body'),
}

/**
 * @summary 查询任务的限制
 *
 * @param request DescribeMonitorTaskLimitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMonitorTaskLimitResponse
 */
async function describeMonitorTaskLimitWithOptions(request: DescribeMonitorTaskLimitRequest, runtime: Util.RuntimeOptions): DescribeMonitorTaskLimitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMonitorTaskLimit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询任务的限制
 *
 * @param request DescribeMonitorTaskLimitRequest
 * @return DescribeMonitorTaskLimitResponse
 */
async function describeMonitorTaskLimit(request: DescribeMonitorTaskLimitRequest): DescribeMonitorTaskLimitResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMonitorTaskLimitWithOptions(request, runtime);
}

model DescribeNameListRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  currentPage?: string(name='currentPage'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  value?: string(name='value'),
  variableId?: string(name='variableId'),
}

model DescribeNameListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      identifier?: string(name='identifier'),
      title?: string(name='title'),
      value?: string(name='value'),
      variableId?: long(name='variableId'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeNameListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNameListResponseBody(name='body'),
}

/**
 * @summary 查询名单分页
 *
 * @param request DescribeNameListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNameListResponse
 */
async function describeNameListWithOptions(request: DescribeNameListRequest, runtime: Util.RuntimeOptions): DescribeNameListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.value)) {
    query['value'] = request.value;
  }
  if (!Util.isUnset(request.variableId)) {
    query['variableId'] = request.variableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNameList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询名单分页
 *
 * @param request DescribeNameListRequest
 * @return DescribeNameListResponse
 */
async function describeNameList(request: DescribeNameListRequest): DescribeNameListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNameListWithOptions(request, runtime);
}

model DescribeNameListDownloadUrlRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  variableId?: long(name='variableId', description='This parameter is required.'),
}

model DescribeNameListDownloadUrlResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    downloadFileUrl?: string(name='downloadFileUrl'),
  }(name='resultObject'),
}

model DescribeNameListDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNameListDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 下载名单列表
 *
 * @param request DescribeNameListDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNameListDownloadUrlResponse
 */
async function describeNameListDownloadUrlWithOptions(request: DescribeNameListDownloadUrlRequest, runtime: Util.RuntimeOptions): DescribeNameListDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.variableId)) {
    query['variableId'] = request.variableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNameListDownloadUrl',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下载名单列表
 *
 * @param request DescribeNameListDownloadUrlRequest
 * @return DescribeNameListDownloadUrlResponse
 */
async function describeNameListDownloadUrl(request: DescribeNameListDownloadUrlRequest): DescribeNameListDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNameListDownloadUrlWithOptions(request, runtime);
}

model DescribeNameListLimitRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  regId?: string(name='regId'),
}

model DescribeNameListLimitResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    limit?: boolean(name='limit'),
    maxTotalItem?: long(name='maxTotalItem'),
    totalItem?: long(name='totalItem'),
  }(name='resultObject'),
}

model DescribeNameListLimitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNameListLimitResponseBody(name='body'),
}

/**
 * @summary 查询名单限制数
 *
 * @param request DescribeNameListLimitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNameListLimitResponse
 */
async function describeNameListLimitWithOptions(request: DescribeNameListLimitRequest, runtime: Util.RuntimeOptions): DescribeNameListLimitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNameListLimit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询名单限制数
 *
 * @param request DescribeNameListLimitRequest
 * @return DescribeNameListLimitResponse
 */
async function describeNameListLimit(request: DescribeNameListLimitRequest): DescribeNameListLimitResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNameListLimitWithOptions(request, runtime);
}

model DescribeNameListPageListRequest {
  lang?: string(name='Lang'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
  updateBeginTime?: long(name='updateBeginTime'),
  updateEndTime?: long(name='updateEndTime'),
  value?: string(name='value'),
  variableId?: long(name='variableId', description='This parameter is required.'),
}

model DescribeNameListPageListResponseBody = {
  currentPage?: string(name='currentPage'),
  pageSize?: string(name='pageSize'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      name?: string(name='name'),
      nameListType?: string(name='nameListType'),
      title?: string(name='title'),
      userId?: string(name='userId'),
      value?: string(name='value'),
      variableId?: long(name='variableId'),
    }
  ](name='resultObject'),
  totalItem?: string(name='totalItem'),
  totalPage?: string(name='totalPage'),
}

model DescribeNameListPageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNameListPageListResponseBody(name='body'),
}

/**
 * @summary 名单内容查询
 *
 * @param request DescribeNameListPageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNameListPageListResponse
 */
async function describeNameListPageListWithOptions(request: DescribeNameListPageListRequest, runtime: Util.RuntimeOptions): DescribeNameListPageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.updateBeginTime)) {
    query['updateBeginTime'] = request.updateBeginTime;
  }
  if (!Util.isUnset(request.updateEndTime)) {
    query['updateEndTime'] = request.updateEndTime;
  }
  if (!Util.isUnset(request.value)) {
    query['value'] = request.value;
  }
  if (!Util.isUnset(request.variableId)) {
    query['variableId'] = request.variableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNameListPageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 名单内容查询
 *
 * @param request DescribeNameListPageListRequest
 * @return DescribeNameListPageListResponse
 */
async function describeNameListPageList(request: DescribeNameListPageListRequest): DescribeNameListPageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNameListPageListWithOptions(request, runtime);
}

model DescribeNameListTypeListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeNameListTypeListResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      key?: string(name='key'),
      value?: string(name='value'),
    }
  ](name='resultObject'),
}

model DescribeNameListTypeListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNameListTypeListResponseBody(name='body'),
}

/**
 * @summary 名单类型列表
 *
 * @param request DescribeNameListTypeListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNameListTypeListResponse
 */
async function describeNameListTypeListWithOptions(request: DescribeNameListTypeListRequest, runtime: Util.RuntimeOptions): DescribeNameListTypeListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNameListTypeList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 名单类型列表
 *
 * @param request DescribeNameListTypeListRequest
 * @return DescribeNameListTypeListResponse
 */
async function describeNameListTypeList(request: DescribeNameListTypeListRequest): DescribeNameListTypeListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNameListTypeListWithOptions(request, runtime);
}

model DescribeNameListVariablePageListRequest {
  lang?: string(name='Lang'),
  currentPage?: int32(name='currentPage'),
  name?: string(name='name'),
  nameListType?: string(name='nameListType'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
  value?: string(name='value'),
}

model DescribeNameListVariablePageListResponseBody = {
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      capacity?: long(name='capacity'),
      description?: string(name='description'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      leftCapacity?: long(name='leftCapacity'),
      name?: string(name='name'),
      nameListType?: string(name='nameListType'),
      refObjId?: string(name='refObjId'),
      refObjType?: long(name='refObjType'),
      sourceType?: string(name='sourceType'),
      title?: string(name='title'),
      type?: string(name='type'),
      userId?: long(name='userId'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeNameListVariablePageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNameListVariablePageListResponseBody(name='body'),
}

/**
 * @summary 名单列表
 *
 * @param request DescribeNameListVariablePageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNameListVariablePageListResponse
 */
async function describeNameListVariablePageListWithOptions(request: DescribeNameListVariablePageListRequest, runtime: Util.RuntimeOptions): DescribeNameListVariablePageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.nameListType)) {
    query['nameListType'] = request.nameListType;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.value)) {
    query['value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNameListVariablePageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 名单列表
 *
 * @param request DescribeNameListVariablePageListRequest
 * @return DescribeNameListVariablePageListResponse
 */
async function describeNameListVariablePageList(request: DescribeNameListVariablePageListRequest): DescribeNameListVariablePageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNameListVariablePageListWithOptions(request, runtime);
}

model DescribeOperationLogPageListRequest {
  lang?: string(name='Lang'),
  currentPage?: int32(name='currentPage'),
  endDate?: long(name='endDate'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
  startDate?: long(name='startDate'),
}

model DescribeOperationLogPageListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      clientIp?: string(name='clientIp'),
      gmtCreate?: long(name='gmtCreate'),
      newContent?: string(name='newContent'),
      oldContent?: string(name='oldContent'),
      operationSummary?: string(name='operationSummary'),
      operationType?: string(name='operationType'),
      userName?: string(name='userName'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeOperationLogPageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOperationLogPageListResponseBody(name='body'),
}

/**
 * @summary 根据事件名称查询事件列表
 *
 * @param request DescribeOperationLogPageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOperationLogPageListResponse
 */
async function describeOperationLogPageListWithOptions(request: DescribeOperationLogPageListRequest, runtime: Util.RuntimeOptions): DescribeOperationLogPageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    query['endDate'] = request.endDate;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.startDate)) {
    query['startDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOperationLogPageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据事件名称查询事件列表
 *
 * @param request DescribeOperationLogPageListRequest
 * @return DescribeOperationLogPageListResponse
 */
async function describeOperationLogPageList(request: DescribeOperationLogPageListRequest): DescribeOperationLogPageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOperationLogPageListWithOptions(request, runtime);
}

model DescribeOperatorListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeOperatorListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      fieldType?: string(name='fieldType'),
      operators?: [ 
        {
          code?: string(name='code'),
          hasRightVariable?: boolean(name='hasRightVariable'),
          memo?: string(name='memo'),
          name?: string(name='name'),
          rightVariables?: [ 
            {
              fieldName?: string(name='fieldName'),
              fieldType?: string(name='fieldType'),
              fieldValue?: string(name='fieldValue'),
            }
          ](name='rightVariables'),
        }
      ](name='operators'),
    }
  ](name='resultObject'),
}

model DescribeOperatorListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOperatorListResponseBody(name='body'),
}

/**
 * @summary 根据客户ID查询操作符映射列表
 *
 * @param request DescribeOperatorListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOperatorListResponse
 */
async function describeOperatorListWithOptions(request: DescribeOperatorListRequest, runtime: Util.RuntimeOptions): DescribeOperatorListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOperatorList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据客户ID查询操作符映射列表
 *
 * @param request DescribeOperatorListRequest
 * @return DescribeOperatorListResponse
 */
async function describeOperatorList(request: DescribeOperatorListRequest): DescribeOperatorListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOperatorListWithOptions(request, runtime);
}

model DescribeOperatorListBySceneRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  scene?: string(name='scene'),
}

model DescribeOperatorListBySceneResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      fieldType?: string(name='fieldType'),
      operators?: [ 
        {
          code?: string(name='code'),
          hasRightVariable?: boolean(name='hasRightVariable'),
          memo?: string(name='memo'),
          name?: string(name='name'),
          rightVariables?: [ 
            {
              fieldName?: string(name='fieldName'),
              fieldType?: string(name='fieldType'),
              fieldValue?: string(name='fieldValue'),
            }
          ](name='rightVariables'),
        }
      ](name='operators'),
    }
  ](name='resultObject'),
}

model DescribeOperatorListBySceneResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOperatorListBySceneResponseBody(name='body'),
}

/**
 * @summary 查询操作符映射列表
 *
 * @param request DescribeOperatorListBySceneRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOperatorListBySceneResponse
 */
async function describeOperatorListBySceneWithOptions(request: DescribeOperatorListBySceneRequest, runtime: Util.RuntimeOptions): DescribeOperatorListBySceneResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOperatorListByScene',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询操作符映射列表
 *
 * @param request DescribeOperatorListBySceneRequest
 * @return DescribeOperatorListBySceneResponse
 */
async function describeOperatorListByScene(request: DescribeOperatorListBySceneRequest): DescribeOperatorListBySceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOperatorListBySceneWithOptions(request, runtime);
}

model DescribeOperatorListByTypeRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeOperatorListByTypeResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      fieldType?: string(name='fieldType'),
      operators?: [ 
        {
          code?: string(name='code'),
          hasRightVariable?: boolean(name='hasRightVariable'),
          name?: string(name='name'),
        }
      ](name='operators'),
    }
  ](name='resultObject'),
}

model DescribeOperatorListByTypeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOperatorListByTypeResponseBody(name='body'),
}

/**
 * @summary 查询操作符映射列表
 *
 * @param request DescribeOperatorListByTypeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOperatorListByTypeResponse
 */
async function describeOperatorListByTypeWithOptions(request: DescribeOperatorListByTypeRequest, runtime: Util.RuntimeOptions): DescribeOperatorListByTypeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOperatorListByType',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询操作符映射列表
 *
 * @param request DescribeOperatorListByTypeRequest
 * @return DescribeOperatorListByTypeResponse
 */
async function describeOperatorListByType(request: DescribeOperatorListByTypeRequest): DescribeOperatorListByTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOperatorListByTypeWithOptions(request, runtime);
}

model DescribeOssAuthStatusRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeOssAuthStatusResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: string(name='resultObject'),
}

model DescribeOssAuthStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOssAuthStatusResponseBody(name='body'),
}

/**
 * @summary 查看是否授权Oss
 *
 * @param request DescribeOssAuthStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOssAuthStatusResponse
 */
async function describeOssAuthStatusWithOptions(request: DescribeOssAuthStatusRequest, runtime: Util.RuntimeOptions): DescribeOssAuthStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOssAuthStatus',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看是否授权Oss
 *
 * @param request DescribeOssAuthStatusRequest
 * @return DescribeOssAuthStatusResponse
 */
async function describeOssAuthStatus(request: DescribeOssAuthStatusRequest): DescribeOssAuthStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOssAuthStatusWithOptions(request, runtime);
}

model DescribeOssPolicyRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId', description='This parameter is required.'),
  scene?: string(name='scene', description='This parameter is required.'),
}

model DescribeOssPolicyResponseBody = {
  accessId?: string(name='AccessId'),
  host?: string(name='Host'),
  key?: string(name='Key'),
  policy?: string(name='Policy'),
  signature?: string(name='Signature'),
  requestId?: string(name='requestId'),
}

model DescribeOssPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOssPolicyResponseBody(name='body'),
}

/**
 * @summary 获取OSS Policy
 *
 * @param request DescribeOssPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOssPolicyResponse
 */
async function describeOssPolicyWithOptions(request: DescribeOssPolicyRequest, runtime: Util.RuntimeOptions): DescribeOssPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOssPolicy',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取OSS Policy
 *
 * @param request DescribeOssPolicyRequest
 * @return DescribeOssPolicyResponse
 */
async function describeOssPolicy(request: DescribeOssPolicyRequest): DescribeOssPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOssPolicyWithOptions(request, runtime);
}

model DescribeOssTokenRequest {
  lang?: string(name='Lang'),
  fileName?: string(name='fileName'),
  regId?: string(name='regId'),
  uploadType?: string(name='uploadType'),
}

model DescribeOssTokenResponseBody = {
  accessId?: string(name='AccessId'),
  host?: string(name='Host'),
  key?: string(name='Key'),
  policy?: string(name='Policy'),
  requestId?: string(name='RequestId'),
  signature?: string(name='Signature'),
  stsToken?: string(name='StsToken'),
}

model DescribeOssTokenResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOssTokenResponseBody(name='body'),
}

/**
 * @summary 获取文件上传凭证
 *
 * @param request DescribeOssTokenRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOssTokenResponse
 */
async function describeOssTokenWithOptions(request: DescribeOssTokenRequest, runtime: Util.RuntimeOptions): DescribeOssTokenResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.fileName)) {
    query['fileName'] = request.fileName;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.uploadType)) {
    query['uploadType'] = request.uploadType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOssToken',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取文件上传凭证
 *
 * @param request DescribeOssTokenRequest
 * @return DescribeOssTokenResponse
 */
async function describeOssToken(request: DescribeOssTokenRequest): DescribeOssTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOssTokenWithOptions(request, runtime);
}

model DescribeParamByEventCodesRequest {
  lang?: string(name='Lang'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  parma?: string(name='parma'),
  regId?: string(name='regId'),
}

model DescribeParamByEventCodesResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      code?: string(name='code'),
      name?: string(name='name'),
    }
  ](name='resultObject'),
}

model DescribeParamByEventCodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeParamByEventCodesResponseBody(name='body'),
}

/**
 * @summary 查询事件属性列表
 *
 * @param request DescribeParamByEventCodesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeParamByEventCodesResponse
 */
async function describeParamByEventCodesWithOptions(request: DescribeParamByEventCodesRequest, runtime: Util.RuntimeOptions): DescribeParamByEventCodesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.parma)) {
    query['parma'] = request.parma;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeParamByEventCodes',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件属性列表
 *
 * @param request DescribeParamByEventCodesRequest
 * @return DescribeParamByEventCodesResponse
 */
async function describeParamByEventCodes(request: DescribeParamByEventCodesRequest): DescribeParamByEventCodesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeParamByEventCodesWithOptions(request, runtime);
}

model DescribeParamListRequest {
  lang?: string(name='Lang'),
  fileUrl?: string(name='fileUrl'),
  regId?: string(name='regId'),
  serviceCode?: string(name='serviceCode'),
}

model DescribeParamListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeParamListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeParamListResponseBody(name='body'),
}

/**
 * @summary 获取映射关系
 *
 * @param request DescribeParamListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeParamListResponse
 */
async function describeParamListWithOptions(request: DescribeParamListRequest, runtime: Util.RuntimeOptions): DescribeParamListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.fileUrl)) {
    query['fileUrl'] = request.fileUrl;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['serviceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeParamList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取映射关系
 *
 * @param request DescribeParamListRequest
 * @return DescribeParamListResponse
 */
async function describeParamList(request: DescribeParamListRequest): DescribeParamListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeParamListWithOptions(request, runtime);
}

model DescribePocDetailRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  taskId?: string(name='taskId'),
  type?: string(name='type'),
}

model DescribePocDetailResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribePocDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePocDetailResponseBody(name='body'),
}

/**
 * @summary 获取任务详情
 *
 * @param request DescribePocDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePocDetailResponse
 */
async function describePocDetailWithOptions(request: DescribePocDetailRequest, runtime: Util.RuntimeOptions): DescribePocDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['taskId'] = request.taskId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePocDetail',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取任务详情
 *
 * @param request DescribePocDetailRequest
 * @return DescribePocDetailResponse
 */
async function describePocDetail(request: DescribePocDetailRequest): DescribePocDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePocDetailWithOptions(request, runtime);
}

model DescribePocOssTokenRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribePocOssTokenResponseBody = {
  accessId?: string(name='AccessId'),
  host?: string(name='Host'),
  key?: string(name='Key'),
  policy?: string(name='Policy'),
  requestId?: string(name='RequestId'),
  signature?: string(name='Signature'),
  resultObject?: boolean(name='resultObject'),
}

model DescribePocOssTokenResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePocOssTokenResponseBody(name='body'),
}

/**
 * @summary 获取文件上传凭证
 *
 * @param request DescribePocOssTokenRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePocOssTokenResponse
 */
async function describePocOssTokenWithOptions(request: DescribePocOssTokenRequest, runtime: Util.RuntimeOptions): DescribePocOssTokenResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePocOssToken',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取文件上传凭证
 *
 * @param request DescribePocOssTokenRequest
 * @return DescribePocOssTokenResponse
 */
async function describePocOssToken(request: DescribePocOssTokenRequest): DescribePocOssTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePocOssTokenWithOptions(request, runtime);
}

model DescribePocTaskListRequest {
  lang?: string(name='Lang'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
  type?: string(name='type'),
}

model DescribePocTaskListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      createTime?: string(name='createTime'),
      downloadUrl?: string(name='downloadUrl'),
      fileType?: string(name='fileType'),
      serviceName?: string(name='serviceName'),
      status?: string(name='status'),
      taskId?: string(name='taskId'),
      taskName?: string(name='taskName'),
      updateTime?: string(name='updateTime'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribePocTaskListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePocTaskListResponseBody(name='body'),
}

/**
 * @summary 获取poc任务列表
 *
 * @param request DescribePocTaskListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePocTaskListResponse
 */
async function describePocTaskListWithOptions(request: DescribePocTaskListRequest, runtime: Util.RuntimeOptions): DescribePocTaskListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePocTaskList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取poc任务列表
 *
 * @param request DescribePocTaskListRequest
 * @return DescribePocTaskListResponse
 */
async function describePocTaskList(request: DescribePocTaskListRequest): DescribePocTaskListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePocTaskListWithOptions(request, runtime);
}

model DescribePrivateStackRequest {
  regId?: string(name='regId'),
}

model DescribePrivateStackResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribePrivateStackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePrivateStackResponseBody(name='body'),
}

/**
 * @summary 判断是否开通Stack私域模式
 *
 * @param request DescribePrivateStackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePrivateStackResponse
 */
async function describePrivateStackWithOptions(request: DescribePrivateStackRequest, runtime: Util.RuntimeOptions): DescribePrivateStackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePrivateStack',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 判断是否开通Stack私域模式
 *
 * @param request DescribePrivateStackRequest
 * @return DescribePrivateStackResponse
 */
async function describePrivateStack(request: DescribePrivateStackRequest): DescribePrivateStackResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePrivateStackWithOptions(request, runtime);
}

model DescribeQueryVariableDetailRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeQueryVariableDetailResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    dataSourceCode?: long(name='dataSourceCode'),
    dataSourceName?: string(name='dataSourceName'),
    description?: string(name='description'),
    eventCode?: string(name='eventCode'),
    expression?: string(name='expression'),
    expressionTitle?: string(name='expressionTitle'),
    expressionVariable?: string(name='expressionVariable'),
    id?: long(name='id'),
    outlier?: string(name='outlier'),
    outputs?: string(name='outputs'),
    title?: string(name='title'),
  }(name='resultObject'),
}

model DescribeQueryVariableDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeQueryVariableDetailResponseBody(name='body'),
}

/**
 * @summary 查询变量详情查询
 *
 * @param request DescribeQueryVariableDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeQueryVariableDetailResponse
 */
async function describeQueryVariableDetailWithOptions(request: DescribeQueryVariableDetailRequest, runtime: Util.RuntimeOptions): DescribeQueryVariableDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeQueryVariableDetail',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量详情查询
 *
 * @param request DescribeQueryVariableDetailRequest
 * @return DescribeQueryVariableDetailResponse
 */
async function describeQueryVariableDetail(request: DescribeQueryVariableDetailRequest): DescribeQueryVariableDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeQueryVariableDetailWithOptions(request, runtime);
}

model DescribeQueryVariablePageListRequest {
  lang?: string(name='Lang'),
  currentPage?: long(name='currentPage'),
  dataSourceCode?: string(name='dataSourceCode'),
  eventCode?: string(name='eventCode'),
  name?: string(name='name'),
  pageSize?: long(name='pageSize'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeQueryVariablePageListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: long(name='currentPage'),
  pageSize?: long(name='pageSize'),
  resultObject?: [ 
    {
      dataSourceCode?: long(name='dataSourceCode'),
      dataSourceName?: string(name='dataSourceName'),
      description?: string(name='description'),
      eventName?: string(name='eventName'),
      fieldType?: string(name='fieldType'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      name?: string(name='name'),
      status?: string(name='status'),
      total?: long(name='total'),
      version?: long(name='version'),
    }
  ](name='resultObject'),
  totalItem?: long(name='totalItem'),
  totalPage?: long(name='totalPage'),
}

model DescribeQueryVariablePageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeQueryVariablePageListResponseBody(name='body'),
}

/**
 * @summary 查询变量列表查询
 *
 * @param request DescribeQueryVariablePageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeQueryVariablePageListResponse
 */
async function describeQueryVariablePageListWithOptions(request: DescribeQueryVariablePageListRequest, runtime: Util.RuntimeOptions): DescribeQueryVariablePageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.dataSourceCode)) {
    query['dataSourceCode'] = request.dataSourceCode;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeQueryVariablePageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量列表查询
 *
 * @param request DescribeQueryVariablePageListRequest
 * @return DescribeQueryVariablePageListResponse
 */
async function describeQueryVariablePageList(request: DescribeQueryVariablePageListRequest): DescribeQueryVariablePageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeQueryVariablePageListWithOptions(request, runtime);
}

model DescribeRecommendSceneVariablesRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  sampleId?: long(name='sampleId', description='This parameter is required.'),
}

model DescribeRecommendSceneVariablesResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeRecommendSceneVariablesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRecommendSceneVariablesResponseBody(name='body'),
}

/**
 * @summary 查询样本&场景下的变量列表
 *
 * @param request DescribeRecommendSceneVariablesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRecommendSceneVariablesResponse
 */
async function describeRecommendSceneVariablesWithOptions(request: DescribeRecommendSceneVariablesRequest, runtime: Util.RuntimeOptions): DescribeRecommendSceneVariablesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sampleId)) {
    query['sampleId'] = request.sampleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRecommendSceneVariables',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询样本&场景下的变量列表
 *
 * @param request DescribeRecommendSceneVariablesRequest
 * @return DescribeRecommendSceneVariablesResponse
 */
async function describeRecommendSceneVariables(request: DescribeRecommendSceneVariablesRequest): DescribeRecommendSceneVariablesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRecommendSceneVariablesWithOptions(request, runtime);
}

model DescribeRecommendTaskDetailRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  taskId?: long(name='taskId'),
}

model DescribeRecommendTaskDetailResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    eventCode?: string(name='eventCode'),
    eventName?: string(name='eventName'),
    expectVelocities?: [ string ](name='expectVelocities'),
    gmtCreate?: long(name='gmtCreate'),
    normalSize?: long(name='normalSize'),
    recommendRuleDTOs?: [ 
      {
        computeExpression?: string(name='computeExpression'),
        hitSample?: long(name='hitSample'),
        id?: long(name='id'),
        notHitSample?: long(name='notHitSample'),
        recommendRules?: [ 
          {
            left?: string(name='left'),
            operator?: string(name='operator'),
            right?: string(name='right'),
          }
        ](name='recommendRules'),
        ruleId?: string(name='ruleId'),
        ruleName?: string(name='ruleName'),
        status?: string(name='status'),
        velocities?: string(name='velocities'),
      }
    ](name='recommendRuleDTOs'),
    recommendVariableDTOs?: [ 
      {
        id?: long(name='id'),
        title?: string(name='title'),
      }
    ](name='recommendVariableDTOs'),
    riskSize?: long(name='riskSize'),
    sampleName?: string(name='sampleName'),
    sampleScene?: string(name='sampleScene'),
    sampleSceneName?: string(name='sampleSceneName'),
    taskId?: long(name='taskId'),
    taskName?: string(name='taskName'),
    taskStatus?: string(name='taskStatus'),
  }(name='resultObject'),
}

model DescribeRecommendTaskDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRecommendTaskDetailResponseBody(name='body'),
}

/**
 * @summary 变量推荐详情查询接口
 *
 * @param request DescribeRecommendTaskDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRecommendTaskDetailResponse
 */
async function describeRecommendTaskDetailWithOptions(request: DescribeRecommendTaskDetailRequest, runtime: Util.RuntimeOptions): DescribeRecommendTaskDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['taskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRecommendTaskDetail',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 变量推荐详情查询接口
 *
 * @param request DescribeRecommendTaskDetailRequest
 * @return DescribeRecommendTaskDetailResponse
 */
async function describeRecommendTaskDetail(request: DescribeRecommendTaskDetailRequest): DescribeRecommendTaskDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRecommendTaskDetailWithOptions(request, runtime);
}

model DescribeRecommendTaskPageListRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  taskName?: string(name='taskName'),
}

model DescribeRecommendTaskPageListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      expectVelocities?: [ string ](name='expectVelocities'),
      gmtCreate?: long(name='gmtCreate'),
      normalCount?: long(name='normalCount'),
      normalSize?: long(name='normalSize'),
      riskCount?: long(name='riskCount'),
      riskSize?: long(name='riskSize'),
      sampleName?: string(name='sampleName'),
      sampleScene?: string(name='sampleScene'),
      taskId?: long(name='taskId'),
      taskName?: string(name='taskName'),
      taskStatus?: string(name='taskStatus'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeRecommendTaskPageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRecommendTaskPageListResponseBody(name='body'),
}

/**
 * @summary 变量推荐列表查询接口
 *
 * @param request DescribeRecommendTaskPageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRecommendTaskPageListResponse
 */
async function describeRecommendTaskPageListWithOptions(request: DescribeRecommendTaskPageListRequest, runtime: Util.RuntimeOptions): DescribeRecommendTaskPageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.taskName)) {
    query['taskName'] = request.taskName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRecommendTaskPageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 变量推荐列表查询接口
 *
 * @param request DescribeRecommendTaskPageListRequest
 * @return DescribeRecommendTaskPageListResponse
 */
async function describeRecommendTaskPageList(request: DescribeRecommendTaskPageListRequest): DescribeRecommendTaskPageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRecommendTaskPageListWithOptions(request, runtime);
}

model DescribeRecommendVariablesVelocityRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  taskId?: long(name='taskId', description='This parameter is required.'),
  variableIdsStr?: string(name='variableIdsStr'),
}

model DescribeRecommendVariablesVelocityResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeRecommendVariablesVelocityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRecommendVariablesVelocityResponseBody(name='body'),
}

/**
 * @summary 查询变量下的指标信息
 *
 * @param request DescribeRecommendVariablesVelocityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRecommendVariablesVelocityResponse
 */
async function describeRecommendVariablesVelocityWithOptions(request: DescribeRecommendVariablesVelocityRequest, runtime: Util.RuntimeOptions): DescribeRecommendVariablesVelocityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['taskId'] = request.taskId;
  }
  if (!Util.isUnset(request.variableIdsStr)) {
    query['variableIdsStr'] = request.variableIdsStr;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRecommendVariablesVelocity',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量下的指标信息
 *
 * @param request DescribeRecommendVariablesVelocityRequest
 * @return DescribeRecommendVariablesVelocityResponse
 */
async function describeRecommendVariablesVelocity(request: DescribeRecommendVariablesVelocityRequest): DescribeRecommendVariablesVelocityResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRecommendVariablesVelocityWithOptions(request, runtime);
}

model DescribeRecommendVelocitiesRequest {
  lang?: string(name='Lang'),
  code?: string(name='code'),
  regId?: string(name='regId'),
  type?: string(name='type'),
}

model DescribeRecommendVelocitiesResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeRecommendVelocitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRecommendVelocitiesResponseBody(name='body'),
}

/**
 * @summary 查询支持的指标列表
 *
 * @param request DescribeRecommendVelocitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRecommendVelocitiesResponse
 */
async function describeRecommendVelocitiesWithOptions(request: DescribeRecommendVelocitiesRequest, runtime: Util.RuntimeOptions): DescribeRecommendVelocitiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.code)) {
    query['code'] = request.code;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRecommendVelocities',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询支持的指标列表
 *
 * @param request DescribeRecommendVelocitiesRequest
 * @return DescribeRecommendVelocitiesResponse
 */
async function describeRecommendVelocities(request: DescribeRecommendVelocitiesRequest): DescribeRecommendVelocitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRecommendVelocitiesWithOptions(request, runtime);
}

model DescribeRegionsRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeRegionsResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRegionsResponseBody(name='body'),
}

/**
 * @summary 查询ApiGateway支持的region列表
 *
 * @param request DescribeRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRegionsResponse
 */
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRegions',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询ApiGateway支持的region列表
 *
 * @param request DescribeRegionsRequest
 * @return DescribeRegionsResponse
 */
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRegionsWithOptions(request, runtime);
}

model DescribeRequestHitRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  sRequestId?: string(name='sRequestId', description='This parameter is required.'),
}

model DescribeRequestHitResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    eventCode?: string(name='eventCode'),
    eventName?: string(name='eventName'),
    inputs?: string(name='inputs'),
    outputs?: string(name='outputs'),
    requestTime?: long(name='requestTime'),
    ruleHitRecords?: [ 
      {
        cost?: int32(name='cost'),
        hitSuccessful?: boolean(name='hitSuccessful'),
        isShowDetail?: boolean(name='isShowDetail'),
        order?: int32(name='order'),
        ruleId?: string(name='ruleId'),
        ruleName?: string(name='ruleName'),
        ruleSnapshotId?: string(name='ruleSnapshotId'),
        ruleStatus?: string(name='ruleStatus'),
      }
    ](name='ruleHitRecords'),
    sRequestId?: string(name='sRequestId'),
    totalCost?: long(name='totalCost'),
  }(name='resultObject'),
}

model DescribeRequestHitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRequestHitResponseBody(name='body'),
}

/**
 * @summary 查询请求命中详情
 *
 * @param request DescribeRequestHitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRequestHitResponse
 */
async function describeRequestHitWithOptions(request: DescribeRequestHitRequest, runtime: Util.RuntimeOptions): DescribeRequestHitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sRequestId)) {
    query['sRequestId'] = request.sRequestId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRequestHit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询请求命中详情
 *
 * @param request DescribeRequestHitRequest
 * @return DescribeRequestHitResponse
 */
async function describeRequestHit(request: DescribeRequestHitRequest): DescribeRequestHitResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRequestHitWithOptions(request, runtime);
}

model DescribeRequestPeakReportRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeRequestPeakReportResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      ratio?: string(name='ratio'),
      value?: string(name='value'),
    }
  ](name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeRequestPeakReportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRequestPeakReportResponseBody(name='body'),
}

/**
 * @summary 请求峰值
 *
 * @param request DescribeRequestPeakReportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRequestPeakReportResponse
 */
async function describeRequestPeakReportWithOptions(request: DescribeRequestPeakReportRequest, runtime: Util.RuntimeOptions): DescribeRequestPeakReportResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRequestPeakReport',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 请求峰值
 *
 * @param request DescribeRequestPeakReportRequest
 * @return DescribeRequestPeakReportResponse
 */
async function describeRequestPeakReport(request: DescribeRequestPeakReportRequest): DescribeRequestPeakReportResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRequestPeakReportWithOptions(request, runtime);
}

model DescribeResultCountRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime', description='This parameter is required.'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeResultCountResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      result?: string(name='result'),
      total?: string(name='total'),
    }
  ](name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeResultCountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeResultCountResponseBody(name='body'),
}

/**
 * @summary 下钻分析
 *
 * @param request DescribeResultCountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeResultCountResponse
 */
async function describeResultCountWithOptions(request: DescribeResultCountRequest, runtime: Util.RuntimeOptions): DescribeResultCountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeResultCount',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下钻分析
 *
 * @param request DescribeResultCountRequest
 * @return DescribeResultCountResponse
 */
async function describeResultCount(request: DescribeResultCountRequest): DescribeResultCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeResultCountWithOptions(request, runtime);
}

model DescribeRiskLineChartRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime', description='This parameter is required.'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
}

model DescribeRiskLineChartResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ string ](name='data'),
        name?: string(name='name'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeRiskLineChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRiskLineChartResponseBody(name='body'),
}

/**
 * @summary 风险地图概览图表(折线图)
 *
 * @param request DescribeRiskLineChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRiskLineChartResponse
 */
async function describeRiskLineChartWithOptions(request: DescribeRiskLineChartRequest, runtime: Util.RuntimeOptions): DescribeRiskLineChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRiskLineChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 风险地图概览图表(折线图)
 *
 * @param request DescribeRiskLineChartRequest
 * @return DescribeRiskLineChartResponse
 */
async function describeRiskLineChart(request: DescribeRiskLineChartRequest): DescribeRiskLineChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRiskLineChartWithOptions(request, runtime);
}

model DescribeRuleBarChartRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime', description='This parameter is required.'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
}

model DescribeRuleBarChartResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ 
          {
            eventName?: string(name='eventName'),
            num?: long(name='num'),
            ruleName?: string(name='ruleName'),
            status?: string(name='status'),
          }
        ](name='data'),
        type?: string(name='type'),
      }
    ](name='series'),
    yaxis?: {
      data?: [ string ](name='data'),
    }(name='yaxis'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeRuleBarChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRuleBarChartResponseBody(name='body'),
}

/**
 * @summary 策略概览列表
 *
 * @param request DescribeRuleBarChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRuleBarChartResponse
 */
async function describeRuleBarChartWithOptions(request: DescribeRuleBarChartRequest, runtime: Util.RuntimeOptions): DescribeRuleBarChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRuleBarChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 策略概览列表
 *
 * @param request DescribeRuleBarChartRequest
 * @return DescribeRuleBarChartResponse
 */
async function describeRuleBarChart(request: DescribeRuleBarChartRequest): DescribeRuleBarChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRuleBarChartWithOptions(request, runtime);
}

model DescribeRuleCountByUserIdRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeRuleCountByUserIdResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    limit?: boolean(name='limit'),
    maxTotalItem?: int32(name='maxTotalItem'),
    totalItem?: int32(name='totalItem'),
  }(name='resultObject'),
}

model DescribeRuleCountByUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRuleCountByUserIdResponseBody(name='body'),
}

/**
 * @summary 根据用户Id查询策略数
 *
 * @param request DescribeRuleCountByUserIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRuleCountByUserIdResponse
 */
async function describeRuleCountByUserIdWithOptions(request: DescribeRuleCountByUserIdRequest, runtime: Util.RuntimeOptions): DescribeRuleCountByUserIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRuleCountByUserId',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据用户Id查询策略数
 *
 * @param request DescribeRuleCountByUserIdRequest
 * @return DescribeRuleCountByUserIdResponse
 */
async function describeRuleCountByUserId(request: DescribeRuleCountByUserIdRequest): DescribeRuleCountByUserIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRuleCountByUserIdWithOptions(request, runtime);
}

model DescribeRuleDetailByRuleIdRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  regId?: string(name='regId'),
  ruleId?: string(name='ruleId'),
  ruleVersionId?: long(name='ruleVersionId'),
}

model DescribeRuleDetailByRuleIdResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    bizVersion?: string(name='bizVersion'),
    consoleRuleId?: long(name='consoleRuleId'),
    eventCode?: string(name='eventCode'),
    eventName?: string(name='eventName'),
    gmtCreate?: long(name='gmtCreate'),
    gmtModified?: long(name='gmtModified'),
    logicExpression?: string(name='logicExpression'),
    mainEventCode?: string(name='mainEventCode'),
    memo?: string(name='memo'),
    ruleActionMap?: map[string]any(name='ruleActionMap'),
    ruleActions?: string(name='ruleActions'),
    ruleExpressions?: string(name='ruleExpressions'),
    ruleId?: string(name='ruleId'),
    ruleName?: string(name='ruleName'),
    ruleStatus?: string(name='ruleStatus'),
    ruleVersionId?: long(name='ruleVersionId'),
  }(name='resultObject'),
}

model DescribeRuleDetailByRuleIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRuleDetailByRuleIdResponseBody(name='body'),
}

/**
 * @summary 查询策略/版本详情
 *
 * @param request DescribeRuleDetailByRuleIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRuleDetailByRuleIdResponse
 */
async function describeRuleDetailByRuleIdWithOptions(request: DescribeRuleDetailByRuleIdRequest, runtime: Util.RuntimeOptions): DescribeRuleDetailByRuleIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleVersionId)) {
    query['ruleVersionId'] = request.ruleVersionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRuleDetailByRuleId',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询策略/版本详情
 *
 * @param request DescribeRuleDetailByRuleIdRequest
 * @return DescribeRuleDetailByRuleIdResponse
 */
async function describeRuleDetailByRuleId(request: DescribeRuleDetailByRuleIdRequest): DescribeRuleDetailByRuleIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRuleDetailByRuleIdWithOptions(request, runtime);
}

model DescribeRuleHitRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  ruleId?: string(name='ruleId'),
  ruleSnapshotId?: string(name='ruleSnapshotId'),
  sRequestId?: string(name='sRequestId'),
}

model DescribeRuleHitResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: map[string]any(name='resultObject'),
}

model DescribeRuleHitResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRuleHitResponseBody(name='body'),
}

/**
 * @summary 查询策略命中详情
 *
 * @param request DescribeRuleHitRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRuleHitResponse
 */
async function describeRuleHitWithOptions(request: DescribeRuleHitRequest, runtime: Util.RuntimeOptions): DescribeRuleHitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleSnapshotId)) {
    query['ruleSnapshotId'] = request.ruleSnapshotId;
  }
  if (!Util.isUnset(request.sRequestId)) {
    query['sRequestId'] = request.sRequestId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRuleHit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询策略命中详情
 *
 * @param request DescribeRuleHitRequest
 * @return DescribeRuleHitResponse
 */
async function describeRuleHit(request: DescribeRuleHitRequest): DescribeRuleHitResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRuleHitWithOptions(request, runtime);
}

model DescribeRuleListByEventCodesListRequest {
  lang?: string(name='Lang'),
  eventCodes?: string(name='eventCodes', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model DescribeRuleListByEventCodesListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      ruleId?: string(name='ruleId'),
      ruleName?: string(name='ruleName'),
    }
  ](name='resultObject'),
}

model DescribeRuleListByEventCodesListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRuleListByEventCodesListResponseBody(name='body'),
}

/**
 * @summary 查询策略列表
 *
 * @param request DescribeRuleListByEventCodesListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRuleListByEventCodesListResponse
 */
async function describeRuleListByEventCodesListWithOptions(request: DescribeRuleListByEventCodesListRequest, runtime: Util.RuntimeOptions): DescribeRuleListByEventCodesListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRuleListByEventCodesList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询策略列表
 *
 * @param request DescribeRuleListByEventCodesListRequest
 * @return DescribeRuleListByEventCodesListResponse
 */
async function describeRuleListByEventCodesList(request: DescribeRuleListByEventCodesListRequest): DescribeRuleListByEventCodesListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRuleListByEventCodesListWithOptions(request, runtime);
}

model DescribeRulePageListRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  currentPage?: string(name='currentPage'),
  eventCode?: string(name='eventCode'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  ruleAuthType?: string(name='ruleAuthType'),
  ruleName?: string(name='ruleName'),
  ruleStatus?: string(name='ruleStatus'),
}

model DescribeRulePageListResponseBody = {
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      authType?: string(name='authType'),
      consoleAudit?: {
        applyUserId?: string(name='applyUserId'),
        applyUserName?: string(name='applyUserName'),
        auditMsg?: string(name='auditMsg'),
        auditRealUserId?: string(name='auditRealUserId'),
        auditRealUserName?: string(name='auditRealUserName'),
        auditRemark?: string(name='auditRemark'),
        auditStatus?: string(name='auditStatus'),
        auditTime?: long(name='auditTime'),
        auditUserId?: string(name='auditUserId'),
        auditUserName?: string(name='auditUserName'),
        gmtCreate?: long(name='gmtCreate'),
        id?: long(name='id'),
        relationExt?: string(name='relationExt'),
        relationId?: long(name='relationId'),
        relationName?: string(name='relationName'),
        relationType?: string(name='relationType'),
      }(name='consoleAudit'),
      eventCode?: string(name='eventCode'),
      eventName?: string(name='eventName'),
      eventType?: string(name='eventType'),
      externalRuleName?: string(name='externalRuleName'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      mainRuleId?: string(name='mainRuleId'),
      priority?: long(name='priority'),
      ruleAuthType?: string(name='ruleAuthType'),
      ruleId?: string(name='ruleId'),
      ruleMemo?: string(name='ruleMemo'),
      ruleName?: string(name='ruleName'),
      ruleStatus?: string(name='ruleStatus'),
      ruleVersionId?: long(name='ruleVersionId'),
      templateId?: long(name='templateId'),
      version?: int32(name='version'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeRulePageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRulePageListResponseBody(name='body'),
}

/**
 * @summary 查询策略列表
 *
 * @param request DescribeRulePageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRulePageListResponse
 */
async function describeRulePageListWithOptions(request: DescribeRulePageListRequest, runtime: Util.RuntimeOptions): DescribeRulePageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleAuthType)) {
    query['ruleAuthType'] = request.ruleAuthType;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.ruleStatus)) {
    query['ruleStatus'] = request.ruleStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRulePageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询策略列表
 *
 * @param request DescribeRulePageListRequest
 * @return DescribeRulePageListResponse
 */
async function describeRulePageList(request: DescribeRulePageListRequest): DescribeRulePageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRulePageListWithOptions(request, runtime);
}

model DescribeRuleSnapshotRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  ruleId?: string(name='ruleId'),
  snapshotVersion?: string(name='snapshotVersion'),
}

model DescribeRuleSnapshotResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    bizVersion?: string(name='bizVersion'),
    eventCode?: string(name='eventCode'),
    eventName?: string(name='eventName'),
    gmtCreate?: long(name='gmtCreate'),
    gmtModified?: long(name='gmtModified'),
    logicExpression?: string(name='logicExpression'),
    memo?: string(name='memo'),
    ruleActions?: string(name='ruleActions'),
    ruleExpressions?: string(name='ruleExpressions'),
    ruleId?: string(name='ruleId'),
    ruleName?: string(name='ruleName'),
    ruleStatus?: string(name='ruleStatus'),
  }(name='resultObject'),
}

model DescribeRuleSnapshotResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRuleSnapshotResponseBody(name='body'),
}

/**
 * @summary 根据ruleId+version查询历史快照
 *
 * @param request DescribeRuleSnapshotRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRuleSnapshotResponse
 */
async function describeRuleSnapshotWithOptions(request: DescribeRuleSnapshotRequest, runtime: Util.RuntimeOptions): DescribeRuleSnapshotResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.snapshotVersion)) {
    query['snapshotVersion'] = request.snapshotVersion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRuleSnapshot',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据ruleId+version查询历史快照
 *
 * @param request DescribeRuleSnapshotRequest
 * @return DescribeRuleSnapshotResponse
 */
async function describeRuleSnapshot(request: DescribeRuleSnapshotRequest): DescribeRuleSnapshotResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRuleSnapshotWithOptions(request, runtime);
}

model DescribeRuleVersionListRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  regId?: string(name='regId'),
  ruleId?: string(name='ruleId'),
}

model DescribeRuleVersionListResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      consoleAudit?: {
        applyUserId?: string(name='applyUserId'),
        applyUserName?: string(name='applyUserName'),
        auditMsg?: string(name='auditMsg'),
        auditRealUserId?: string(name='auditRealUserId'),
        auditRealUserName?: string(name='auditRealUserName'),
        auditRemark?: string(name='auditRemark'),
        auditStatus?: string(name='auditStatus'),
        auditTime?: long(name='auditTime'),
        auditUserId?: string(name='auditUserId'),
        auditUserName?: string(name='auditUserName'),
        gmtCreate?: long(name='gmtCreate'),
        id?: long(name='id'),
        relationExt?: string(name='relationExt'),
        relationId?: long(name='relationId'),
        relationName?: string(name='relationName'),
        relationType?: string(name='relationType'),
      }(name='consoleAudit'),
      consoleRuleId?: long(name='consoleRuleId'),
      consoleRuleMemo?: string(name='consoleRuleMemo'),
      consoleRuleName?: string(name='consoleRuleName'),
      eventCode?: string(name='eventCode'),
      eventType?: string(name='eventType'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      lastOperator?: string(name='lastOperator'),
      priority?: long(name='priority'),
      ruleId?: string(name='ruleId'),
      ruleStatus?: string(name='ruleStatus'),
      version?: long(name='version'),
    }
  ](name='resultObject'),
}

model DescribeRuleVersionListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRuleVersionListResponseBody(name='body'),
}

/**
 * @summary 查询策略版本列表
 *
 * @param request DescribeRuleVersionListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRuleVersionListResponse
 */
async function describeRuleVersionListWithOptions(request: DescribeRuleVersionListRequest, runtime: Util.RuntimeOptions): DescribeRuleVersionListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRuleVersionList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询策略版本列表
 *
 * @param request DescribeRuleVersionListRequest
 * @return DescribeRuleVersionListResponse
 */
async function describeRuleVersionList(request: DescribeRuleVersionListRequest): DescribeRuleVersionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRuleVersionListWithOptions(request, runtime);
}

model DescribeSDKDownloadListRequest {
  lang?: string(name='Lang'),
  deviceType?: string(name='deviceType'),
  listType?: string(name='listType'),
  regId?: string(name='regId'),
}

model DescribeSDKDownloadListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      description?: string(name='description'),
      developer?: string(name='developer'),
      deviceType?: string(name='deviceType'),
      downloadUrl?: string(name='downloadUrl'),
      md5?: string(name='md5'),
      packageName?: string(name='packageName'),
      privacyLink?: string(name='privacyLink'),
      pushTime?: string(name='pushTime'),
      sdkVersion?: string(name='sdkVersion'),
      size?: string(name='size'),
    }
  ](name='resultObject'),
}

model DescribeSDKDownloadListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSDKDownloadListResponseBody(name='body'),
}

/**
 * @summary 获取老旧版本sdk下载列表
 *
 * @param request DescribeSDKDownloadListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSDKDownloadListResponse
 */
async function describeSDKDownloadListWithOptions(request: DescribeSDKDownloadListRequest, runtime: Util.RuntimeOptions): DescribeSDKDownloadListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.deviceType)) {
    query['deviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.listType)) {
    query['listType'] = request.listType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSDKDownloadList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取老旧版本sdk下载列表
 *
 * @param request DescribeSDKDownloadListRequest
 * @return DescribeSDKDownloadListResponse
 */
async function describeSDKDownloadList(request: DescribeSDKDownloadListRequest): DescribeSDKDownloadListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSDKDownloadListWithOptions(request, runtime);
}

model DescribeSafConsoleRequest {
  lang?: string(name='Lang'),
  content?: string(name='content'),
  service?: string(name='service', description='This parameter is required.'),
}

model DescribeSafConsoleResponseBody = {
  requestId?: string(name='RequestId'),
  bizData?: [ string ](name='bizData'),
}

model DescribeSafConsoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSafConsoleResponseBody(name='body'),
}

/**
 * @param request DescribeSafConsoleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSafConsoleResponse
 */
async function describeSafConsoleWithOptions(request: DescribeSafConsoleRequest, runtime: Util.RuntimeOptions): DescribeSafConsoleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.content)) {
    query['content'] = request.content;
  }
  if (!Util.isUnset(request.service)) {
    query['service'] = request.service;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSafConsole',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeSafConsoleRequest
 * @return DescribeSafConsoleResponse
 */
async function describeSafConsole(request: DescribeSafConsoleRequest): DescribeSafConsoleResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSafConsoleWithOptions(request, runtime);
}

model DescribeSafDeOrderRequest {
  lang?: string(name='Lang'),
  currentPage?: int32(name='currentPage'),
  endDate?: string(name='endDate'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
  startDate?: string(name='startDate'),
}

model DescribeSafDeOrderResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    expirationDate?: long(name='expirationDate'),
    openUserType?: int32(name='openUserType'),
  }(name='resultObject'),
}

model DescribeSafDeOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSafDeOrderResponseBody(name='body'),
}

/**
 * @summary 查询saf_de订单
 *
 * @param request DescribeSafDeOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSafDeOrderResponse
 */
async function describeSafDeOrderWithOptions(request: DescribeSafDeOrderRequest, runtime: Util.RuntimeOptions): DescribeSafDeOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    query['endDate'] = request.endDate;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.startDate)) {
    query['startDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSafDeOrder',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询saf_de订单
 *
 * @param request DescribeSafDeOrderRequest
 * @return DescribeSafDeOrderResponse
 */
async function describeSafDeOrder(request: DescribeSafDeOrderRequest): DescribeSafDeOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSafDeOrderWithOptions(request, runtime);
}

model DescribeSafOrderRequest {
  lang?: string(name='Lang'),
  currentPage?: int32(name='currentPage'),
  endDate?: string(name='endDate'),
  exactProductCode?: string(name='exactProductCode'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
  startDate?: string(name='startDate'),
}

model DescribeSafOrderResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    expirationDate?: long(name='expirationDate'),
  }(name='resultObject'),
}

model DescribeSafOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSafOrderResponseBody(name='body'),
}

/**
 * @summary 查询订单信息
 *
 * @param request DescribeSafOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSafOrderResponse
 */
async function describeSafOrderWithOptions(request: DescribeSafOrderRequest, runtime: Util.RuntimeOptions): DescribeSafOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    query['endDate'] = request.endDate;
  }
  if (!Util.isUnset(request.exactProductCode)) {
    query['exactProductCode'] = request.exactProductCode;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.startDate)) {
    query['startDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSafOrder',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询订单信息
 *
 * @param request DescribeSafOrderRequest
 * @return DescribeSafOrderResponse
 */
async function describeSafOrder(request: DescribeSafOrderRequest): DescribeSafOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSafOrderWithOptions(request, runtime);
}

model DescribeSafStartConfigRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeSafStartConfigResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    deviceTypes?: [ string ](name='deviceTypes'),
    eventCodes?: [ string ](name='eventCodes'),
    languages?: [ string ](name='languages'),
    serverRegions?: [ string ](name='serverRegions'),
  }(name='resultObject'),
}

model DescribeSafStartConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSafStartConfigResponseBody(name='body'),
}

/**
 * @summary 查询接入配置
 *
 * @param request DescribeSafStartConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSafStartConfigResponse
 */
async function describeSafStartConfigWithOptions(request: DescribeSafStartConfigRequest, runtime: Util.RuntimeOptions): DescribeSafStartConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSafStartConfig',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询接入配置
 *
 * @param request DescribeSafStartConfigRequest
 * @return DescribeSafStartConfigResponse
 */
async function describeSafStartConfig(request: DescribeSafStartConfigRequest): DescribeSafStartConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSafStartConfigWithOptions(request, runtime);
}

model DescribeSafStartStepsRequest {
  lang?: string(name='Lang'),
  aliyunServer?: boolean(name='aliyunServer'),
  deviceTypesStr?: string(name='deviceTypesStr'),
  eventCode?: string(name='eventCode'),
  language?: string(name='language'),
  regId?: string(name='regId'),
  serverRegion?: string(name='serverRegion'),
}

model DescribeSafStartStepsResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      content?: string(name='content'),
      id?: string(name='id'),
      type?: string(name='type'),
    }
  ](name='resultObject'),
}

model DescribeSafStartStepsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSafStartStepsResponseBody(name='body'),
}

/**
 * @summary 查询接入配置
 *
 * @param request DescribeSafStartStepsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSafStartStepsResponse
 */
async function describeSafStartStepsWithOptions(request: DescribeSafStartStepsRequest, runtime: Util.RuntimeOptions): DescribeSafStartStepsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.aliyunServer)) {
    query['aliyunServer'] = request.aliyunServer;
  }
  if (!Util.isUnset(request.deviceTypesStr)) {
    query['deviceTypesStr'] = request.deviceTypesStr;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.language)) {
    query['language'] = request.language;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.serverRegion)) {
    query['serverRegion'] = request.serverRegion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSafStartSteps',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询接入配置
 *
 * @param request DescribeSafStartStepsRequest
 * @return DescribeSafStartStepsResponse
 */
async function describeSafStartSteps(request: DescribeSafStartStepsRequest): DescribeSafStartStepsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSafStartStepsWithOptions(request, runtime);
}

model DescribeSafTagListRequest {
  lang?: string(name='Lang'),
  apiId?: string(name='apiId'),
  currentPage?: string(name='currentPage'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
}

model DescribeSafTagListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      tagDesc?: string(name='tagDesc'),
      tagMean?: string(name='tagMean'),
      tagName?: string(name='tagName'),
      tagState?: string(name='tagState'),
      tagType?: string(name='tagType'),
      tagUid?: string(name='tagUid'),
      updateTime?: string(name='updateTime'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeSafTagListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSafTagListResponseBody(name='body'),
}

/**
 * @summary 获取风险标签列表
 *
 * @param request DescribeSafTagListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSafTagListResponse
 */
async function describeSafTagListWithOptions(request: DescribeSafTagListRequest, runtime: Util.RuntimeOptions): DescribeSafTagListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.apiId)) {
    query['apiId'] = request.apiId;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSafTagList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取风险标签列表
 *
 * @param request DescribeSafTagListRequest
 * @return DescribeSafTagListResponse
 */
async function describeSafTagList(request: DescribeSafTagListRequest): DescribeSafTagListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSafTagListWithOptions(request, runtime);
}

model DescribeSampleDataListRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage'),
  deleteTag?: string(name='deleteTag'),
  pageSize?: string(name='pageSize'),
  queryContent?: string(name='queryContent'),
  regId?: string(name='regId'),
  sampleId?: long(name='sampleId'),
  scene?: string(name='scene'),
  status?: string(name='status'),
}

model DescribeSampleDataListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      classificationType?: string(name='classificationType'),
      dataDistributed?: string(name='dataDistributed'),
      dataTitle?: string(name='dataTitle'),
      deleteTag?: string(name='deleteTag'),
      description?: string(name='description'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      name?: string(name='name'),
      normalSize?: long(name='normalSize'),
      recallConfig?: string(name='recallConfig'),
      riskSize?: long(name='riskSize'),
      riskValue?: string(name='riskValue'),
      sampleLabelDetail?: string(name='sampleLabelDetail'),
      sampleSize?: long(name='sampleSize'),
      scene?: string(name='scene'),
      status?: string(name='status'),
      storePath?: string(name='storePath'),
      storeType?: string(name='storeType'),
      supportRecall?: string(name='supportRecall'),
      userId?: long(name='userId'),
      version?: int32(name='version'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeSampleDataListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSampleDataListResponseBody(name='body'),
}

/**
 * @summary 样本列表分页查询
 *
 * @param request DescribeSampleDataListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSampleDataListResponse
 */
async function describeSampleDataListWithOptions(request: DescribeSampleDataListRequest, runtime: Util.RuntimeOptions): DescribeSampleDataListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.deleteTag)) {
    query['deleteTag'] = request.deleteTag;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryContent)) {
    query['queryContent'] = request.queryContent;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sampleId)) {
    query['sampleId'] = request.sampleId;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSampleDataList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 样本列表分页查询
 *
 * @param request DescribeSampleDataListRequest
 * @return DescribeSampleDataListResponse
 */
async function describeSampleDataList(request: DescribeSampleDataListRequest): DescribeSampleDataListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleDataListWithOptions(request, runtime);
}

model DescribeSampleDemoDownloadUrlRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  scene?: string(name='scene', description='This parameter is required.'),
}

model DescribeSampleDemoDownloadUrlResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeSampleDemoDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSampleDemoDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 查询样本示例授权
 *
 * @param request DescribeSampleDemoDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSampleDemoDownloadUrlResponse
 */
async function describeSampleDemoDownloadUrlWithOptions(request: DescribeSampleDemoDownloadUrlRequest, runtime: Util.RuntimeOptions): DescribeSampleDemoDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSampleDemoDownloadUrl',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询样本示例授权
 *
 * @param request DescribeSampleDemoDownloadUrlRequest
 * @return DescribeSampleDemoDownloadUrlResponse
 */
async function describeSampleDemoDownloadUrl(request: DescribeSampleDemoDownloadUrlRequest): DescribeSampleDemoDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleDemoDownloadUrlWithOptions(request, runtime);
}

model DescribeSampleDownloadUrlRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  sampleId?: long(name='sampleId', description='This parameter is required.'),
}

model DescribeSampleDownloadUrlResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeSampleDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSampleDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 查询样本下载授权信息
 *
 * @param request DescribeSampleDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSampleDownloadUrlResponse
 */
async function describeSampleDownloadUrlWithOptions(request: DescribeSampleDownloadUrlRequest, runtime: Util.RuntimeOptions): DescribeSampleDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sampleId)) {
    query['sampleId'] = request.sampleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSampleDownloadUrl',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询样本下载授权信息
 *
 * @param request DescribeSampleDownloadUrlRequest
 * @return DescribeSampleDownloadUrlResponse
 */
async function describeSampleDownloadUrl(request: DescribeSampleDownloadUrlRequest): DescribeSampleDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleDownloadUrlWithOptions(request, runtime);
}

model DescribeSampleInfoRequest {
  lang?: string(name='Lang'),
  id?: long(name='id'),
  regId?: string(name='regId'),
  versions?: int32(name='versions'),
}

model DescribeSampleInfoResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    id?: long(name='id'),
    sampleTags?: string(name='sampleTags'),
    sampleType?: string(name='sampleType'),
    sampleValue?: string(name='sampleValue'),
    updateTime?: string(name='updateTime'),
    version?: int32(name='version'),
  }(name='resultObject'),
}

model DescribeSampleInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSampleInfoResponseBody(name='body'),
}

/**
 * @summary 查询样本详情
 *
 * @param request DescribeSampleInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSampleInfoResponse
 */
async function describeSampleInfoWithOptions(request: DescribeSampleInfoRequest, runtime: Util.RuntimeOptions): DescribeSampleInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.versions)) {
    query['versions'] = request.versions;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSampleInfo',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询样本详情
 *
 * @param request DescribeSampleInfoRequest
 * @return DescribeSampleInfoResponse
 */
async function describeSampleInfo(request: DescribeSampleInfoRequest): DescribeSampleInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleInfoWithOptions(request, runtime);
}

model DescribeSampleListRequest {
  lang?: string(name='Lang'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  regId?: string(name='regId'),
  sampleType?: string(name='sampleType'),
  sampleValue?: string(name='sampleValue'),
}

model DescribeSampleListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      id?: long(name='id'),
      sampleTags?: string(name='sampleTags'),
      sampleType?: int32(name='sampleType'),
      sampleValue?: string(name='sampleValue'),
      updateTime?: long(name='updateTime'),
      version?: int32(name='version'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeSampleListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSampleListResponseBody(name='body'),
}

/**
 * @summary 查询样本列表
 *
 * @param request DescribeSampleListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSampleListResponse
 */
async function describeSampleListWithOptions(request: DescribeSampleListRequest, runtime: Util.RuntimeOptions): DescribeSampleListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sampleType)) {
    query['sampleType'] = request.sampleType;
  }
  if (!Util.isUnset(request.sampleValue)) {
    query['sampleValue'] = request.sampleValue;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSampleList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询样本列表
 *
 * @param request DescribeSampleListRequest
 * @return DescribeSampleListResponse
 */
async function describeSampleList(request: DescribeSampleListRequest): DescribeSampleListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleListWithOptions(request, runtime);
}

model DescribeSampleSceneListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeSampleSceneListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      bizType?: string(name='bizType'),
      configKey?: string(name='configKey'),
      configValue?: string(name='configValue'),
      creator?: string(name='creator'),
      description?: string(name='description'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      lastModifiedOperator?: string(name='lastModifiedOperator'),
      status?: string(name='status'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeSampleSceneListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSampleSceneListResponseBody(name='body'),
}

/**
 * @summary 查询场景列表
 *
 * @param request DescribeSampleSceneListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSampleSceneListResponse
 */
async function describeSampleSceneListWithOptions(request: DescribeSampleSceneListRequest, runtime: Util.RuntimeOptions): DescribeSampleSceneListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSampleSceneList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询场景列表
 *
 * @param request DescribeSampleSceneListRequest
 * @return DescribeSampleSceneListResponse
 */
async function describeSampleSceneList(request: DescribeSampleSceneListRequest): DescribeSampleSceneListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleSceneListWithOptions(request, runtime);
}

model DescribeSampleTagListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeSampleTagListResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeSampleTagListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSampleTagListResponseBody(name='body'),
}

/**
 * @summary 获取标签列表
 *
 * @param request DescribeSampleTagListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSampleTagListResponse
 */
async function describeSampleTagListWithOptions(request: DescribeSampleTagListRequest, runtime: Util.RuntimeOptions): DescribeSampleTagListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSampleTagList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取标签列表
 *
 * @param request DescribeSampleTagListRequest
 * @return DescribeSampleTagListResponse
 */
async function describeSampleTagList(request: DescribeSampleTagListRequest): DescribeSampleTagListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleTagListWithOptions(request, runtime);
}

model DescribeSampleUploadPolicyRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeSampleUploadPolicyResponseBody = {
  accessId?: string(name='AccessId'),
  host?: string(name='Host'),
  key?: string(name='Key'),
  policy?: string(name='Policy'),
  requestId?: string(name='RequestId'),
  signature?: string(name='Signature'),
  stsToken?: string(name='StsToken'),
}

model DescribeSampleUploadPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSampleUploadPolicyResponseBody(name='body'),
}

/**
 * @summary 查询样本上传授权信息
 *
 * @param request DescribeSampleUploadPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSampleUploadPolicyResponse
 */
async function describeSampleUploadPolicyWithOptions(request: DescribeSampleUploadPolicyRequest, runtime: Util.RuntimeOptions): DescribeSampleUploadPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSampleUploadPolicy',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询样本上传授权信息
 *
 * @param request DescribeSampleUploadPolicyRequest
 * @return DescribeSampleUploadPolicyResponse
 */
async function describeSampleUploadPolicy(request: DescribeSampleUploadPolicyRequest): DescribeSampleUploadPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleUploadPolicyWithOptions(request, runtime);
}

model DescribeSceneAllEventNameCodeListRequest {
  lang?: string(name='Lang', example='zh'),
  createType?: string(name='createType', example='NORMAL'),
  regId?: string(name='regId', example='cn-hangzhou'),
}

model DescribeSceneAllEventNameCodeListResponseBody = {
  code?: string(name='code', example='200'),
  httpStatusCode?: string(name='httpStatusCode', example='200'),
  message?: string(name='message', example='The input parameter data is not valid. order_storage_company_num component not found'),
  requestId?: string(name='requestId', example='AE7E6105-7DEB-5125-9B24-DCBC139F6CD2'),
  resultObject?: [ 
    {
      children?: [ 
        {
          createType?: string(name='createType', example='NORMAL'),
          eventCode?: string(name='eventCode', example='de_aamexg3015'),
          eventName?: string(name='eventName'),
          eventType?: string(name='eventType', example='BYPASS'),
        }
      ](name='children'),
      createType?: string(name='createType', example='MORMAL'),
      eventCode?: string(name='eventCode', example='de_aszbjb7236'),
      eventName?: string(name='eventName'),
      eventType?: string(name='eventType', example='MAIN'),
    }
  ](name='resultObject'),
  success?: boolean(name='success', example='true'),
}

model DescribeSceneAllEventNameCodeListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSceneAllEventNameCodeListResponseBody(name='body'),
}

/**
 * @summary 场景化服务事件下拉列表
 *
 * @param request DescribeSceneAllEventNameCodeListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSceneAllEventNameCodeListResponse
 */
async function describeSceneAllEventNameCodeListWithOptions(request: DescribeSceneAllEventNameCodeListRequest, runtime: Util.RuntimeOptions): DescribeSceneAllEventNameCodeListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSceneAllEventNameCodeList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 场景化服务事件下拉列表
 *
 * @param request DescribeSceneAllEventNameCodeListRequest
 * @return DescribeSceneAllEventNameCodeListResponse
 */
async function describeSceneAllEventNameCodeList(request: DescribeSceneAllEventNameCodeListRequest): DescribeSceneAllEventNameCodeListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSceneAllEventNameCodeListWithOptions(request, runtime);
}

model DescribeSceneEventPageListRequest {
  lang?: string(name='Lang', example='zh'),
  currentPage?: string(name='currentPage', example='1'),
  nameOrCode?: string(name='nameOrCode', example='servicer_code'),
  pageSize?: string(name='pageSize', example='10'),
  regId?: string(name='regId', example='cn-hangzhou'),
}

model DescribeSceneEventPageListResponseBody = {
  currentPage?: int32(name='currentPage', example='1'),
  pageSize?: int32(name='pageSize', example='20'),
  requestId?: string(name='requestId', example='AE7E6105-7DEB-5125-9B24-DCBC139F6CD2'),
  resultObject?: [ 
    {
      commonRuleCount?: string(name='commonRuleCount', example='10'),
      customRuleCount?: string(name='customRuleCount', example='10'),
      eventCode?: string(name='eventCode', example='de_aszbjb7236'),
      eventName?: string(name='eventName'),
      gmtModified?: string(name='gmtModified', example='1565701886000'),
      modifier?: string(name='modifier'),
      normalRuleCount?: string(name='normalRuleCount', example='10'),
      service?: string(name='service', example='device_risk'),
      useStatus?: string(name='useStatus'),
      whiteBoxRuleCount?: string(name='whiteBoxRuleCount', example='10'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem', example='3'),
  totalPage?: int32(name='totalPage', example='9'),
}

model DescribeSceneEventPageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSceneEventPageListResponseBody(name='body'),
}

/**
 * @summary 场景化风控事件列表
 *
 * @param request DescribeSceneEventPageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSceneEventPageListResponse
 */
async function describeSceneEventPageListWithOptions(request: DescribeSceneEventPageListRequest, runtime: Util.RuntimeOptions): DescribeSceneEventPageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.nameOrCode)) {
    query['nameOrCode'] = request.nameOrCode;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSceneEventPageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 场景化风控事件列表
 *
 * @param request DescribeSceneEventPageListRequest
 * @return DescribeSceneEventPageListResponse
 */
async function describeSceneEventPageList(request: DescribeSceneEventPageListRequest): DescribeSceneEventPageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSceneEventPageListWithOptions(request, runtime);
}

model DescribeSceneRulePageListRequest {
  lang?: string(name='Lang', example='zh'),
  createType?: string(name='createType', example='NOMAL'),
  currentPage?: string(name='currentPage', example='1'),
  eventCode?: string(name='eventCode', example='de_ahgctb7098'),
  pageSize?: string(name='pageSize', example='20'),
  regId?: string(name='regId', example='cn-hangzhou'),
  ruleAuthType?: string(name='ruleAuthType', example='CUSTMER'),
  ruleName?: string(name='ruleName'),
  ruleStatus?: string(name='ruleStatus', example='RUNNING'),
}

model DescribeSceneRulePageListResponseBody = {
  currentPage?: int32(name='currentPage', example='1'),
  pageSize?: int32(name='pageSize', example='20'),
  requestId?: string(name='requestId', example='AE7E6105-7DEB-5125-9B24-DCBC139F6CD2'),
  resultObject?: [ 
    {
      authType?: string(name='authType', example='admin'),
      consoleAudit?: {
        applyUserId?: string(name='applyUserId', example='1234567890999'),
        applyUserName?: string(name='applyUserName'),
        auditMsg?: string(name='auditMsg'),
        auditRealUserId?: string(name='auditRealUserId', example='1234567890'),
        auditRealUserName?: string(name='auditRealUserName'),
        auditRemark?: string(name='auditRemark'),
        auditStatus?: string(name='auditStatus', example='AGREE'),
        auditTime?: long(name='auditTime', example='1545726028000'),
        auditUserId?: string(name='auditUserId', example='123'),
        auditUserName?: string(name='auditUserName'),
        gmtCreate?: long(name='gmtCreate', example='1545726028000'),
        id?: long(name='id', example='1728'),
        relationExt?: string(name='relationExt', example='{}'),
        relationId?: long(name='relationId', example='123'),
        relationName?: string(name='relationName', example='t'),
        relationType?: string(name='relationType', example='RULE'),
      }(name='consoleAudit'),
      eventCode?: string(name='eventCode', example='de_aszbjb7236'),
      eventName?: string(name='eventName'),
      eventType?: string(name='eventType', example='MAIN'),
      externalRuleName?: string(name='externalRuleName'),
      gmtCreate?: long(name='gmtCreate', example='1621578648000'),
      gmtModified?: long(name='gmtModified', example='1565701886000'),
      id?: long(name='id', example='497'),
      mainRuleId?: string(name='mainRuleId', example='4399'),
      priority?: long(name='priority', example='10'),
      ruleAuthType?: string(name='ruleAuthType', example='CUSTMER'),
      ruleId?: string(name='ruleId', example='4730'),
      ruleMemo?: string(name='ruleMemo'),
      ruleName?: string(name='ruleName'),
      ruleStatus?: string(name='ruleStatus', example='RUNNING'),
      ruleVersionId?: long(name='ruleVersionId', example='3823'),
      templateId?: long(name='templateId', example='6'),
      version?: int32(name='version', example='1.0'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem', example='3'),
  totalPage?: int32(name='totalPage', example='9'),
}

model DescribeSceneRulePageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSceneRulePageListResponseBody(name='body'),
}

/**
 * @summary 风控服务白盒化策略列表
 *
 * @param request DescribeSceneRulePageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSceneRulePageListResponse
 */
async function describeSceneRulePageListWithOptions(request: DescribeSceneRulePageListRequest, runtime: Util.RuntimeOptions): DescribeSceneRulePageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleAuthType)) {
    query['ruleAuthType'] = request.ruleAuthType;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.ruleStatus)) {
    query['ruleStatus'] = request.ruleStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSceneRulePageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 风控服务白盒化策略列表
 *
 * @param request DescribeSceneRulePageListRequest
 * @return DescribeSceneRulePageListResponse
 */
async function describeSceneRulePageList(request: DescribeSceneRulePageListRequest): DescribeSceneRulePageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSceneRulePageListWithOptions(request, runtime);
}

model DescribeScoreSectionNumLineChartRequest {
  lang?: string(name='Lang'),
  beginTime?: string(name='beginTime', description='This parameter is required.'),
  byPassEventCodes?: string(name='byPassEventCodes'),
  endTime?: string(name='endTime', description='This parameter is required.'),
  mainEventCodes?: string(name='mainEventCodes'),
  regId?: string(name='regId'),
  shuntEventCodes?: string(name='shuntEventCodes'),
}

model DescribeScoreSectionNumLineChartResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ string ](name='data'),
        name?: string(name='name'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
}

model DescribeScoreSectionNumLineChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScoreSectionNumLineChartResponseBody(name='body'),
}

/**
 * @summary 分值区间数量分析
 *
 * @param request DescribeScoreSectionNumLineChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScoreSectionNumLineChartResponse
 */
async function describeScoreSectionNumLineChartWithOptions(request: DescribeScoreSectionNumLineChartRequest, runtime: Util.RuntimeOptions): DescribeScoreSectionNumLineChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.byPassEventCodes)) {
    query['byPassEventCodes'] = request.byPassEventCodes;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.mainEventCodes)) {
    query['mainEventCodes'] = request.mainEventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.shuntEventCodes)) {
    query['shuntEventCodes'] = request.shuntEventCodes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScoreSectionNumLineChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分值区间数量分析
 *
 * @param request DescribeScoreSectionNumLineChartRequest
 * @return DescribeScoreSectionNumLineChartResponse
 */
async function describeScoreSectionNumLineChart(request: DescribeScoreSectionNumLineChartRequest): DescribeScoreSectionNumLineChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScoreSectionNumLineChartWithOptions(request, runtime);
}

model DescribeScoreSectionPieChartRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime'),
  endTime?: long(name='endTime'),
  eventCodes?: string(name='eventCodes'),
  eventType?: string(name='eventType'),
  regId?: string(name='regId'),
}

model DescribeScoreSectionPieChartResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    animation?: boolean(name='animation'),
    grid?: {
      show?: boolean(name='show'),
    }(name='grid'),
    series?: [ 
      {
        data?: [ 
          {
            name?: string(name='name'),
            value?: string(name='value'),
          }
        ](name='data'),
        name?: string(name='name'),
        roseType?: boolean(name='roseType'),
      }
    ](name='series'),
  }(name='resultObject'),
}

model DescribeScoreSectionPieChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScoreSectionPieChartResponseBody(name='body'),
}

/**
 * @summary 主事件/旁路事件/分流事件分值区间占比
 *
 * @param request DescribeScoreSectionPieChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScoreSectionPieChartResponse
 */
async function describeScoreSectionPieChartWithOptions(request: DescribeScoreSectionPieChartRequest, runtime: Util.RuntimeOptions): DescribeScoreSectionPieChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.eventType)) {
    query['eventType'] = request.eventType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScoreSectionPieChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 主事件/旁路事件/分流事件分值区间占比
 *
 * @param request DescribeScoreSectionPieChartRequest
 * @return DescribeScoreSectionPieChartResponse
 */
async function describeScoreSectionPieChart(request: DescribeScoreSectionPieChartRequest): DescribeScoreSectionPieChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScoreSectionPieChartWithOptions(request, runtime);
}

model DescribeScoreSectionRatioLineChartRequest {
  lang?: string(name='Lang'),
  beginTime?: string(name='beginTime', description='This parameter is required.'),
  byPassEventCodes?: string(name='byPassEventCodes'),
  endTime?: string(name='endTime', description='This parameter is required.'),
  mainEventCodes?: string(name='mainEventCodes'),
  regId?: string(name='regId'),
  shuntEventCodes?: string(name='shuntEventCodes'),
}

model DescribeScoreSectionRatioLineChartResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ string ](name='data'),
        name?: string(name='name'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
}

model DescribeScoreSectionRatioLineChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScoreSectionRatioLineChartResponseBody(name='body'),
}

/**
 * @summary 分值区间占比分析
 *
 * @param request DescribeScoreSectionRatioLineChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScoreSectionRatioLineChartResponse
 */
async function describeScoreSectionRatioLineChartWithOptions(request: DescribeScoreSectionRatioLineChartRequest, runtime: Util.RuntimeOptions): DescribeScoreSectionRatioLineChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.byPassEventCodes)) {
    query['byPassEventCodes'] = request.byPassEventCodes;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.mainEventCodes)) {
    query['mainEventCodes'] = request.mainEventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.shuntEventCodes)) {
    query['shuntEventCodes'] = request.shuntEventCodes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScoreSectionRatioLineChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分值区间占比分析
 *
 * @param request DescribeScoreSectionRatioLineChartRequest
 * @return DescribeScoreSectionRatioLineChartResponse
 */
async function describeScoreSectionRatioLineChart(request: DescribeScoreSectionRatioLineChartRequest): DescribeScoreSectionRatioLineChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScoreSectionRatioLineChartWithOptions(request, runtime);
}

model DescribeSelectItemRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeSelectItemResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    monitorStatusList?: [ string ](name='monitorStatusList'),
    taskIdList?: [ string ](name='taskIdList'),
  }(name='resultObject'),
}

model DescribeSelectItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSelectItemResponseBody(name='body'),
}

/**
 * @summary 查询任务ID列表
 *
 * @param request DescribeSelectItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSelectItemResponse
 */
async function describeSelectItemWithOptions(request: DescribeSelectItemRequest, runtime: Util.RuntimeOptions): DescribeSelectItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSelectItem',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询任务ID列表
 *
 * @param request DescribeSelectItemRequest
 * @return DescribeSelectItemResponse
 */
async function describeSelectItem(request: DescribeSelectItemRequest): DescribeSelectItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSelectItemWithOptions(request, runtime);
}

model DescribeServiceAppKeyRequest {
  regId?: string(name='regId'),
}

model DescribeServiceAppKeyResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  uccess?: boolean(name='uccess'),
}

model DescribeServiceAppKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeServiceAppKeyResponseBody(name='body'),
}

/**
 * @summary ServiceAppkey下拉
 *
 * @param request DescribeServiceAppKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeServiceAppKeyResponse
 */
async function describeServiceAppKeyWithOptions(request: DescribeServiceAppKeyRequest, runtime: Util.RuntimeOptions): DescribeServiceAppKeyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeServiceAppKey',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary ServiceAppkey下拉
 *
 * @param request DescribeServiceAppKeyRequest
 * @return DescribeServiceAppKeyResponse
 */
async function describeServiceAppKey(request: DescribeServiceAppKeyRequest): DescribeServiceAppKeyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeServiceAppKeyWithOptions(request, runtime);
}

model DescribeServiceConsumeRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage'),
  endDate?: string(name='endDate', description='This parameter is required.'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  serviceCode?: string(name='serviceCode', description='This parameter is required.'),
  startDate?: string(name='startDate', description='This parameter is required.'),
}

model DescribeServiceConsumeResponseBody = {
  requestId?: string(name='RequestId'),
  consumeRecords?: [ 
    {
      date?: string(name='date'),
      records?: [ 
        {
          count?: int32(name='count'),
          serviceCode?: string(name='serviceCode'),
        }
      ](name='records'),
    }
  ](name='consumeRecords'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeServiceConsumeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeServiceConsumeResponseBody(name='body'),
}

/**
 * @summary 获取服务调用量
 *
 * @param request DescribeServiceConsumeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeServiceConsumeResponse
 */
async function describeServiceConsumeWithOptions(request: DescribeServiceConsumeRequest, runtime: Util.RuntimeOptions): DescribeServiceConsumeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    query['endDate'] = request.endDate;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['serviceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.startDate)) {
    query['startDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeServiceConsume',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取服务调用量
 *
 * @param request DescribeServiceConsumeRequest
 * @return DescribeServiceConsumeResponse
 */
async function describeServiceConsume(request: DescribeServiceConsumeRequest): DescribeServiceConsumeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeServiceConsumeWithOptions(request, runtime);
}

model DescribeServiceConsumeDownloadUrlRequest {
  lang?: string(name='Lang'),
  endDate?: string(name='endDate', description='This parameter is required.'),
  regId?: string(name='regId'),
  serviceCode?: string(name='serviceCode', description='This parameter is required.'),
  startDate?: string(name='startDate', description='This parameter is required.'),
}

model DescribeServiceConsumeDownloadUrlResponseBody = {
  requestId?: string(name='RequestId'),
  downloadFileUrl?: string(name='downloadFileUrl'),
}

model DescribeServiceConsumeDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeServiceConsumeDownloadUrlResponseBody(name='body'),
}

/**
 * @summary 下载服务调用量数据文件URL
 *
 * @param request DescribeServiceConsumeDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeServiceConsumeDownloadUrlResponse
 */
async function describeServiceConsumeDownloadUrlWithOptions(request: DescribeServiceConsumeDownloadUrlRequest, runtime: Util.RuntimeOptions): DescribeServiceConsumeDownloadUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.endDate)) {
    query['endDate'] = request.endDate;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['serviceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.startDate)) {
    query['startDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeServiceConsumeDownloadUrl',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下载服务调用量数据文件URL
 *
 * @param request DescribeServiceConsumeDownloadUrlRequest
 * @return DescribeServiceConsumeDownloadUrlResponse
 */
async function describeServiceConsumeDownloadUrl(request: DescribeServiceConsumeDownloadUrlRequest): DescribeServiceConsumeDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeServiceConsumeDownloadUrlWithOptions(request, runtime);
}

model DescribeServiceListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeServiceListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      serviceCode?: string(name='serviceCode'),
      serviceName?: string(name='serviceName'),
    }
  ](name='resultObject'),
}

model DescribeServiceListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeServiceListResponseBody(name='body'),
}

/**
 * @summary 获取服务列表
 *
 * @param request DescribeServiceListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeServiceListResponse
 */
async function describeServiceListWithOptions(request: DescribeServiceListRequest, runtime: Util.RuntimeOptions): DescribeServiceListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeServiceList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取服务列表
 *
 * @param request DescribeServiceListRequest
 * @return DescribeServiceListResponse
 */
async function describeServiceList(request: DescribeServiceListRequest): DescribeServiceListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeServiceListWithOptions(request, runtime);
}

model DescribeSimulationPreditInfoRequest {
  lang?: string(name='Lang'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  regId?: string(name='regId'),
  rulesStr?: string(name='rulesStr', description='This parameter is required.'),
}

model DescribeSimulationPreditInfoResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeSimulationPreditInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSimulationPreditInfoResponseBody(name='body'),
}

/**
 * @summary 预估调用信息
 *
 * @param request DescribeSimulationPreditInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSimulationPreditInfoResponse
 */
async function describeSimulationPreditInfoWithOptions(request: DescribeSimulationPreditInfoRequest, runtime: Util.RuntimeOptions): DescribeSimulationPreditInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.rulesStr)) {
    query['rulesStr'] = request.rulesStr;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSimulationPreditInfo',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 预估调用信息
 *
 * @param request DescribeSimulationPreditInfoRequest
 * @return DescribeSimulationPreditInfoResponse
 */
async function describeSimulationPreditInfo(request: DescribeSimulationPreditInfoRequest): DescribeSimulationPreditInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSimulationPreditInfoWithOptions(request, runtime);
}

model DescribeSimulationTaskCountRequest {
  lang?: string(name='Lang'),
  dataSourceConfig?: string(name='dataSourceConfig'),
  dataSourceType?: string(name='dataSourceType'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  filtersStr?: string(name='filtersStr'),
  regId?: string(name='regId'),
  startTime?: long(name='startTime', description='This parameter is required.'),
}

model DescribeSimulationTaskCountResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeSimulationTaskCountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSimulationTaskCountResponseBody(name='body'),
}

/**
 * @summary 查询任务记录数
 *
 * @param request DescribeSimulationTaskCountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSimulationTaskCountResponse
 */
async function describeSimulationTaskCountWithOptions(request: DescribeSimulationTaskCountRequest, runtime: Util.RuntimeOptions): DescribeSimulationTaskCountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataSourceConfig)) {
    query['dataSourceConfig'] = request.dataSourceConfig;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    query['dataSourceType'] = request.dataSourceType;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.filtersStr)) {
    query['filtersStr'] = request.filtersStr;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['startTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSimulationTaskCount',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询任务记录数
 *
 * @param request DescribeSimulationTaskCountRequest
 * @return DescribeSimulationTaskCountResponse
 */
async function describeSimulationTaskCount(request: DescribeSimulationTaskCountRequest): DescribeSimulationTaskCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSimulationTaskCountWithOptions(request, runtime);
}

model DescribeSimulationTaskListRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage'),
  id?: string(name='id'),
  name?: string(name='name'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  title?: string(name='title'),
}

model DescribeSimulationTaskListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: boolean(name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeSimulationTaskListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSimulationTaskListResponseBody(name='body'),
}

/**
 * @summary 任务列表
 *
 * @param request DescribeSimulationTaskListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSimulationTaskListResponse
 */
async function describeSimulationTaskListWithOptions(request: DescribeSimulationTaskListRequest, runtime: Util.RuntimeOptions): DescribeSimulationTaskListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSimulationTaskList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 任务列表
 *
 * @param request DescribeSimulationTaskListRequest
 * @return DescribeSimulationTaskListResponse
 */
async function describeSimulationTaskList(request: DescribeSimulationTaskListRequest): DescribeSimulationTaskListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSimulationTaskListWithOptions(request, runtime);
}

model DescribeSlsUrlConfigRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeSlsUrlConfigResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: string(name='resultObject'),
}

model DescribeSlsUrlConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSlsUrlConfigResponseBody(name='body'),
}

/**
 * @summary 获取project配置
 *
 * @param request DescribeSlsUrlConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSlsUrlConfigResponse
 */
async function describeSlsUrlConfigWithOptions(request: DescribeSlsUrlConfigRequest, runtime: Util.RuntimeOptions): DescribeSlsUrlConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSlsUrlConfig',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取project配置
 *
 * @param request DescribeSlsUrlConfigRequest
 * @return DescribeSlsUrlConfigResponse
 */
async function describeSlsUrlConfig(request: DescribeSlsUrlConfigRequest): DescribeSlsUrlConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSlsUrlConfigWithOptions(request, runtime);
}

model DescribeSupportRuleListRequest {
  lang?: string(name='Lang'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeSupportRuleListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeSupportRuleListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSupportRuleListResponseBody(name='body'),
}

/**
 * @summary 查询支持仿真的策略列表
 *
 * @param request DescribeSupportRuleListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSupportRuleListResponse
 */
async function describeSupportRuleListWithOptions(request: DescribeSupportRuleListRequest, runtime: Util.RuntimeOptions): DescribeSupportRuleListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSupportRuleList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询支持仿真的策略列表
 *
 * @param request DescribeSupportRuleListRequest
 * @return DescribeSupportRuleListResponse
 */
async function describeSupportRuleList(request: DescribeSupportRuleListRequest): DescribeSupportRuleListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSupportRuleListWithOptions(request, runtime);
}

model DescribeTagListRequest {
  id?: string(name='Id'),
  lang?: string(name='Lang'),
  regId?: string(name='RegId'),
}

model DescribeTagListResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: string(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  resultObject?: string(name='ResultObject'),
}

model DescribeTagListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagListResponseBody(name='body'),
}

/**
 * @summary 标签列表
 *
 * @param request DescribeTagListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagListResponse
 */
async function describeTagListWithOptions(request: DescribeTagListRequest, runtime: Util.RuntimeOptions): DescribeTagListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['RegId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTagList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 标签列表
 *
 * @param request DescribeTagListRequest
 * @return DescribeTagListResponse
 */
async function describeTagList(request: DescribeTagListRequest): DescribeTagListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagListWithOptions(request, runtime);
}

model DescribeTagsBarChartRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime', description='This parameter is required.'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
  result?: string(name='result'),
}

model DescribeTagsBarChartResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ 
          {
            num?: long(name='num'),
            scale?: string(name='scale'),
          }
        ](name='data'),
        name?: string(name='name'),
        stack?: string(name='stack'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeTagsBarChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagsBarChartResponseBody(name='body'),
}

/**
 * @summary 标签概览列表
 *
 * @param request DescribeTagsBarChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagsBarChartResponse
 */
async function describeTagsBarChartWithOptions(request: DescribeTagsBarChartRequest, runtime: Util.RuntimeOptions): DescribeTagsBarChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.result)) {
    query['result'] = request.result;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTagsBarChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 标签概览列表
 *
 * @param request DescribeTagsBarChartRequest
 * @return DescribeTagsBarChartResponse
 */
async function describeTagsBarChart(request: DescribeTagsBarChartRequest): DescribeTagsBarChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagsBarChartWithOptions(request, runtime);
}

model DescribeTagsFluctuationRequest {
  lang?: string(name='Lang'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
}

model DescribeTagsFluctuationResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      tableName?: string(name='tableName'),
      todayNum?: long(name='todayNum'),
      withinSevenDayNum?: string(name='withinSevenDayNum'),
      withinThirtyDayNum?: string(name='withinThirtyDayNum'),
      withinThreeDayNum?: string(name='withinThreeDayNum'),
      yesterdayNum?: long(name='yesterdayNum'),
    }
  ](name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeTagsFluctuationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagsFluctuationResponseBody(name='body'),
}

/**
 * @summary 标签波动检测
 *
 * @param request DescribeTagsFluctuationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagsFluctuationResponse
 */
async function describeTagsFluctuationWithOptions(request: DescribeTagsFluctuationRequest, runtime: Util.RuntimeOptions): DescribeTagsFluctuationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTagsFluctuation',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 标签波动检测
 *
 * @param request DescribeTagsFluctuationRequest
 * @return DescribeTagsFluctuationResponse
 */
async function describeTagsFluctuation(request: DescribeTagsFluctuationRequest): DescribeTagsFluctuationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagsFluctuationWithOptions(request, runtime);
}

model DescribeTagsListRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeTagsListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeTagsListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagsListResponseBody(name='body'),
}

/**
 * @summary 获取标签列表
 *
 * @param request DescribeTagsListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagsListResponse
 */
async function describeTagsListWithOptions(request: DescribeTagsListRequest, runtime: Util.RuntimeOptions): DescribeTagsListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTagsList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取标签列表
 *
 * @param request DescribeTagsListRequest
 * @return DescribeTagsListResponse
 */
async function describeTagsList(request: DescribeTagsListRequest): DescribeTagsListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagsListWithOptions(request, runtime);
}

model DescribeTagsNumLineChartRequest {
  lang?: string(name='Lang'),
  beginTime?: string(name='beginTime', description='This parameter is required.'),
  byPassEventCodes?: string(name='byPassEventCodes'),
  endTime?: string(name='endTime', description='This parameter is required.'),
  mainEventCodes?: string(name='mainEventCodes'),
  regId?: string(name='regId'),
  shuntEventCodes?: string(name='shuntEventCodes'),
}

model DescribeTagsNumLineChartResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ string ](name='data'),
        name?: string(name='name'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
}

model DescribeTagsNumLineChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagsNumLineChartResponseBody(name='body'),
}

/**
 * @summary 标签命中数量分析
 *
 * @param request DescribeTagsNumLineChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagsNumLineChartResponse
 */
async function describeTagsNumLineChartWithOptions(request: DescribeTagsNumLineChartRequest, runtime: Util.RuntimeOptions): DescribeTagsNumLineChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.byPassEventCodes)) {
    query['byPassEventCodes'] = request.byPassEventCodes;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.mainEventCodes)) {
    query['mainEventCodes'] = request.mainEventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.shuntEventCodes)) {
    query['shuntEventCodes'] = request.shuntEventCodes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTagsNumLineChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 标签命中数量分析
 *
 * @param request DescribeTagsNumLineChartRequest
 * @return DescribeTagsNumLineChartResponse
 */
async function describeTagsNumLineChart(request: DescribeTagsNumLineChartRequest): DescribeTagsNumLineChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagsNumLineChartWithOptions(request, runtime);
}

model DescribeTagsRatioLineChartRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime', description='This parameter is required.'),
  byPassEventCodes?: string(name='byPassEventCodes'),
  endTime?: long(name='endTime', description='This parameter is required.'),
  mainEventCodes?: string(name='mainEventCodes'),
  regId?: string(name='regId', description='This parameter is required.'),
  shuntEventCodes?: string(name='shuntEventCodes'),
}

model DescribeTagsRatioLineChartResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ string ](name='data'),
        name?: string(name='name'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
}

model DescribeTagsRatioLineChartResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagsRatioLineChartResponseBody(name='body'),
}

/**
 * @summary 标签命中占比分析
 *
 * @param request DescribeTagsRatioLineChartRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagsRatioLineChartResponse
 */
async function describeTagsRatioLineChartWithOptions(request: DescribeTagsRatioLineChartRequest, runtime: Util.RuntimeOptions): DescribeTagsRatioLineChartResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.byPassEventCodes)) {
    query['byPassEventCodes'] = request.byPassEventCodes;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.mainEventCodes)) {
    query['mainEventCodes'] = request.mainEventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.shuntEventCodes)) {
    query['shuntEventCodes'] = request.shuntEventCodes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTagsRatioLineChart',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 标签命中占比分析
 *
 * @param request DescribeTagsRatioLineChartRequest
 * @return DescribeTagsRatioLineChartResponse
 */
async function describeTagsRatioLineChart(request: DescribeTagsRatioLineChartRequest): DescribeTagsRatioLineChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagsRatioLineChartWithOptions(request, runtime);
}

model DescribeTagsTrendRequest {
  lang?: string(name='Lang'),
  beginTime?: long(name='beginTime'),
  endTime?: long(name='endTime'),
  eventCodes?: string(name='eventCodes'),
  regId?: string(name='regId'),
  result?: string(name='result'),
}

model DescribeTagsTrendResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: {
    series?: [ 
      {
        data?: [ 
          {
            num?: long(name='num'),
            scale?: string(name='scale'),
          }
        ](name='data'),
        name?: string(name='name'),
      }
    ](name='series'),
    xaxis?: {
      data?: [ string ](name='data'),
    }(name='xaxis'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeTagsTrendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagsTrendResponseBody(name='body'),
}

/**
 * @summary 标签命中趋势
 *
 * @param request DescribeTagsTrendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagsTrendResponse
 */
async function describeTagsTrendWithOptions(request: DescribeTagsTrendRequest, runtime: Util.RuntimeOptions): DescribeTagsTrendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.beginTime)) {
    query['beginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.endTime)) {
    query['endTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.result)) {
    query['result'] = request.result;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTagsTrend',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 标签命中趋势
 *
 * @param request DescribeTagsTrendRequest
 * @return DescribeTagsTrendResponse
 */
async function describeTagsTrend(request: DescribeTagsTrendRequest): DescribeTagsTrendResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagsTrendWithOptions(request, runtime);
}

model DescribeTaskListRequest {
  currentPage?: string(name='CurrentPage'),
  isPage?: boolean(name='IsPage'),
  lang?: string(name='Lang'),
  pageSize?: string(name='PageSize'),
  regId?: string(name='regId'),
}

model DescribeTaskListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      completionTime?: long(name='completionTime'),
      createTime?: long(name='createTime'),
      id?: long(name='id'),
      mark?: int32(name='mark'),
      remark?: string(name='remark'),
      sceneName?: string(name='sceneName'),
      status?: string(name='status'),
      taskLogId?: long(name='taskLogId'),
      taskType?: string(name='taskType'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeTaskListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTaskListResponseBody(name='body'),
}

/**
 * @summary 任务列表
 *
 * @param request DescribeTaskListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTaskListResponse
 */
async function describeTaskListWithOptions(request: DescribeTaskListRequest, runtime: Util.RuntimeOptions): DescribeTaskListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.isPage)) {
    query['IsPage'] = request.isPage;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTaskList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 任务列表
 *
 * @param request DescribeTaskListRequest
 * @return DescribeTaskListResponse
 */
async function describeTaskList(request: DescribeTaskListRequest): DescribeTaskListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTaskListWithOptions(request, runtime);
}

model DescribeTaskLogListRequest {
  currentPage?: string(name='CurrentPage'),
  isPage?: boolean(name='IsPage'),
  lang?: string(name='Lang'),
  pageSize?: string(name='PageSize'),
  taskId?: string(name='TaskId'),
  taskLogId?: string(name='TaskLogId'),
  regId?: string(name='regId'),
}

model DescribeTaskLogListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      completionTime?: long(name='completionTime'),
      createTime?: long(name='createTime'),
      id?: long(name='id'),
      remark?: string(name='remark'),
      sceneName?: string(name='sceneName'),
      status?: string(name='status'),
      taskType?: string(name='taskType'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeTaskLogListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTaskLogListResponseBody(name='body'),
}

/**
 * @summary 任务日志列表
 *
 * @param request DescribeTaskLogListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTaskLogListResponse
 */
async function describeTaskLogListWithOptions(request: DescribeTaskLogListRequest, runtime: Util.RuntimeOptions): DescribeTaskLogListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.isPage)) {
    query['IsPage'] = request.isPage;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.taskLogId)) {
    query['TaskLogId'] = request.taskLogId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTaskLogList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 任务日志列表
 *
 * @param request DescribeTaskLogListRequest
 * @return DescribeTaskLogListResponse
 */
async function describeTaskLogList(request: DescribeTaskLogListRequest): DescribeTaskLogListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTaskLogListWithOptions(request, runtime);
}

model DescribeTemplateBaseInfoByTemplateIdRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  templateId?: long(name='templateId'),
}

model DescribeTemplateBaseInfoByTemplateIdResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    description?: string(name='description'),
    eventCode?: string(name='eventCode'),
    eventName?: string(name='eventName'),
    eventStauts?: string(name='eventStauts'),
    inputFields?: [ 
      {
        description?: string(name='description'),
        fieldCode?: string(name='fieldCode'),
        fieldRank?: string(name='fieldRank'),
        fieldSource?: string(name='fieldSource'),
        fieldType?: string(name='fieldType'),
        title?: string(name='title'),
      }
    ](name='inputFields'),
    ruleDetails?: [ 
      {
        logicExpression?: string(name='logicExpression'),
        memo?: string(name='memo'),
        ruleActions?: string(name='ruleActions'),
        ruleExpressions?: string(name='ruleExpressions'),
        ruleId?: string(name='ruleId'),
        ruleName?: string(name='ruleName'),
        ruleStatus?: string(name='ruleStatus'),
      }
    ](name='ruleDetails'),
    templateCode?: string(name='templateCode'),
    templateName?: string(name='templateName'),
    templateType?: string(name='templateType'),
    version?: int32(name='version'),
  }(name='resultObject'),
}

model DescribeTemplateBaseInfoByTemplateIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTemplateBaseInfoByTemplateIdResponseBody(name='body'),
}

/**
 * @summary 查询事件模版详情
 *
 * @param request DescribeTemplateBaseInfoByTemplateIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTemplateBaseInfoByTemplateIdResponse
 */
async function describeTemplateBaseInfoByTemplateIdWithOptions(request: DescribeTemplateBaseInfoByTemplateIdRequest, runtime: Util.RuntimeOptions): DescribeTemplateBaseInfoByTemplateIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['templateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTemplateBaseInfoByTemplateId',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件模版详情
 *
 * @param request DescribeTemplateBaseInfoByTemplateIdRequest
 * @return DescribeTemplateBaseInfoByTemplateIdResponse
 */
async function describeTemplateBaseInfoByTemplateId(request: DescribeTemplateBaseInfoByTemplateIdRequest): DescribeTemplateBaseInfoByTemplateIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTemplateBaseInfoByTemplateIdWithOptions(request, runtime);
}

model DescribeTemplateCountRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeTemplateCountResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    limit?: boolean(name='limit'),
    maxTotalItem?: int32(name='maxTotalItem'),
    totalItem?: int32(name='totalItem'),
  }(name='resultObject'),
}

model DescribeTemplateCountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTemplateCountResponseBody(name='body'),
}

/**
 * @summary 查询事件总数量
 *
 * @param request DescribeTemplateCountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTemplateCountResponse
 */
async function describeTemplateCountWithOptions(request: DescribeTemplateCountRequest, runtime: Util.RuntimeOptions): DescribeTemplateCountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTemplateCount',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询事件总数量
 *
 * @param request DescribeTemplateCountRequest
 * @return DescribeTemplateCountResponse
 */
async function describeTemplateCount(request: DescribeTemplateCountRequest): DescribeTemplateCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTemplateCountWithOptions(request, runtime);
}

model DescribeTemplateDownloadRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeTemplateDownloadResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model DescribeTemplateDownloadResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTemplateDownloadResponseBody(name='body'),
}

/**
 * @summary 模版下载
 *
 * @param request DescribeTemplateDownloadRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTemplateDownloadResponse
 */
async function describeTemplateDownloadWithOptions(request: DescribeTemplateDownloadRequest, runtime: Util.RuntimeOptions): DescribeTemplateDownloadResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTemplateDownload',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 模版下载
 *
 * @param request DescribeTemplateDownloadRequest
 * @return DescribeTemplateDownloadResponse
 */
async function describeTemplateDownload(request: DescribeTemplateDownloadRequest): DescribeTemplateDownloadResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTemplateDownloadWithOptions(request, runtime);
}

model DescribeTemplatePageListRequest {
  lang?: string(name='Lang'),
  currentPage?: string(name='currentPage'),
  eventCodes?: string(name='eventCodes'),
  pageSize?: string(name='pageSize'),
  regId?: string(name='regId'),
  templateName?: string(name='templateName'),
  templateSearchItem?: string(name='templateSearchItem'),
  templateStatus?: string(name='templateStatus'),
  templateType?: string(name='templateType'),
}

model DescribeTemplatePageListResponseBody = {
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      description?: string(name='description'),
      eventCode?: string(name='eventCode'),
      eventName?: string(name='eventName'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      ruleCount?: int32(name='ruleCount'),
      templateCode?: string(name='templateCode'),
      templateName?: string(name='templateName'),
      templateStatus?: string(name='templateStatus'),
      templateType?: string(name='templateType'),
      userCount?: int32(name='userCount'),
      version?: int32(name='version'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeTemplatePageListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTemplatePageListResponseBody(name='body'),
}

/**
 * @summary 根据事件名称查询事件列表
 *
 * @param request DescribeTemplatePageListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTemplatePageListResponse
 */
async function describeTemplatePageListWithOptions(request: DescribeTemplatePageListRequest, runtime: Util.RuntimeOptions): DescribeTemplatePageListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateName)) {
    query['templateName'] = request.templateName;
  }
  if (!Util.isUnset(request.templateSearchItem)) {
    query['templateSearchItem'] = request.templateSearchItem;
  }
  if (!Util.isUnset(request.templateStatus)) {
    query['templateStatus'] = request.templateStatus;
  }
  if (!Util.isUnset(request.templateType)) {
    query['templateType'] = request.templateType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTemplatePageList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据事件名称查询事件列表
 *
 * @param request DescribeTemplatePageListRequest
 * @return DescribeTemplatePageListResponse
 */
async function describeTemplatePageList(request: DescribeTemplatePageListRequest): DescribeTemplatePageListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTemplatePageListWithOptions(request, runtime);
}

model DescribeUsedServiceRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeUsedServiceResponseBody = {
  requestId?: string(name='RequestId'),
  records?: [ 
    {
      enName?: string(name='enName'),
      name?: string(name='name'),
      serviceCode?: string(name='serviceCode'),
    }
  ](name='records'),
}

model DescribeUsedServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUsedServiceResponseBody(name='body'),
}

/**
 * @summary 获取用户使用过服务列表
 *
 * @param request DescribeUsedServiceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUsedServiceResponse
 */
async function describeUsedServiceWithOptions(request: DescribeUsedServiceRequest, runtime: Util.RuntimeOptions): DescribeUsedServiceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUsedService',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用户使用过服务列表
 *
 * @param request DescribeUsedServiceRequest
 * @return DescribeUsedServiceResponse
 */
async function describeUsedService(request: DescribeUsedServiceRequest): DescribeUsedServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUsedServiceWithOptions(request, runtime);
}

model DescribeUserInfoRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
}

model DescribeUserInfoResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  resultObject?: {
    clientIp?: string(name='clientIp'),
    subId?: string(name='subId'),
    userId?: long(name='userId'),
    userName?: string(name='userName'),
  }(name='resultObject'),
  success?: boolean(name='success'),
}

model DescribeUserInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUserInfoResponseBody(name='body'),
}

/**
 * @summary 获取当前登录用户信息
 *
 * @param request DescribeUserInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUserInfoResponse
 */
async function describeUserInfoWithOptions(request: DescribeUserInfoRequest, runtime: Util.RuntimeOptions): DescribeUserInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUserInfo',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取当前登录用户信息
 *
 * @param request DescribeUserInfoRequest
 * @return DescribeUserInfoResponse
 */
async function describeUserInfo(request: DescribeUserInfoRequest): DescribeUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUserInfoWithOptions(request, runtime);
}

model DescribeVariableBindDetailRequest {
  lang?: string(name='Lang'),
  defineId?: long(name='defineId'),
  id?: long(name='id'),
  regId?: string(name='regId'),
}

model DescribeVariableBindDetailResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    allowModify?: boolean(name='allowModify'),
    defineId?: long(name='defineId'),
    defineTitle?: string(name='defineTitle'),
    description?: string(name='description'),
    eventCode?: string(name='eventCode'),
    id?: long(name='id'),
    params?: [ 
      {
        eventFieldName?: string(name='eventFieldName'),
        required?: boolean(name='required'),
        variableName?: string(name='variableName'),
      }
    ](name='params'),
    relationRules?: [ 
      {
        key?: string(name='key'),
        value?: string(name='value'),
      }
    ](name='relationRules'),
    title?: string(name='title'),
  }(name='resultObject'),
}

model DescribeVariableBindDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVariableBindDetailResponseBody(name='body'),
}

/**
 * @summary 查询变量绑定信息
 *
 * @param request DescribeVariableBindDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVariableBindDetailResponse
 */
async function describeVariableBindDetailWithOptions(request: DescribeVariableBindDetailRequest, runtime: Util.RuntimeOptions): DescribeVariableBindDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.defineId)) {
    query['defineId'] = request.defineId;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVariableBindDetail',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量绑定信息
 *
 * @param request DescribeVariableBindDetailRequest
 * @return DescribeVariableBindDetailResponse
 */
async function describeVariableBindDetail(request: DescribeVariableBindDetailRequest): DescribeVariableBindDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVariableBindDetailWithOptions(request, runtime);
}

model DescribeVariableDetailRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeVariableDetailResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    baseInfo?: {
      allowBind?: string(name='allowBind'),
      chargingMode?: string(name='chargingMode'),
      chargingModeDesc?: string(name='chargingModeDesc'),
      creator?: string(name='creator'),
      dataDisplay?: string(name='dataDisplay'),
      dataThreshold?: string(name='dataThreshold'),
      deductionFactor?: int32(name='deductionFactor'),
      description?: string(name='description'),
      frontAllowBind?: string(name='frontAllowBind'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      inputRequired?: string(name='inputRequired'),
      inputs?: string(name='inputs'),
      inputsDesc?: string(name='inputsDesc'),
      invokeKey?: string(name='invokeKey'),
      invokeRt?: int32(name='invokeRt'),
      invokeSuccessRate?: string(name='invokeSuccessRate'),
      invokeTimes?: long(name='invokeTimes'),
      lastModifiedOperator?: string(name='lastModifiedOperator'),
      name?: string(name='name'),
      outputs?: string(name='outputs'),
      outputsDesc?: string(name='outputsDesc'),
      scene?: [ string ](name='scene'),
      sceneDesc?: [ string ](name='sceneDesc'),
      showOrder?: string(name='showOrder'),
      source?: string(name='source'),
      sourceDesc?: string(name='sourceDesc'),
      status?: string(name='status'),
      supportRegions?: [ string ](name='supportRegions'),
      title?: string(name='title'),
      type?: string(name='type'),
      typeDesc?: string(name='typeDesc'),
      xLabel?: string(name='xLabel'),
      yLabel?: string(name='yLabel'),
    }(name='baseInfo'),
  }(name='resultObject'),
}

model DescribeVariableDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVariableDetailResponseBody(name='body'),
}

/**
 * @summary 查询变量详情
 *
 * @param request DescribeVariableDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVariableDetailResponse
 */
async function describeVariableDetailWithOptions(request: DescribeVariableDetailRequest, runtime: Util.RuntimeOptions): DescribeVariableDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVariableDetail',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量详情
 *
 * @param request DescribeVariableDetailRequest
 * @return DescribeVariableDetailResponse
 */
async function describeVariableDetail(request: DescribeVariableDetailRequest): DescribeVariableDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVariableDetailWithOptions(request, runtime);
}

model DescribeVariableFeeRequest {
  lang?: string(name='Lang'),
  ids?: [ long ](name='ids', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeVariableFeeResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model DescribeVariableFeeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVariableFeeResponseBody(name='body'),
}

/**
 * @summary 查询变量收费信息
 *
 * @param request DescribeVariableFeeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVariableFeeResponse
 */
async function describeVariableFeeWithOptions(request: DescribeVariableFeeRequest, runtime: Util.RuntimeOptions): DescribeVariableFeeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.ids)) {
    query['ids'] = request.ids;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVariableFee',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量收费信息
 *
 * @param request DescribeVariableFeeRequest
 * @return DescribeVariableFeeResponse
 */
async function describeVariableFee(request: DescribeVariableFeeRequest): DescribeVariableFeeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVariableFeeWithOptions(request, runtime);
}

model DescribeVariableListRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  currentPage?: string(name='currentPage'),
  pageSize?: string(name='pageSize'),
  refObjId?: string(name='refObjId'),
  regId?: string(name='regId'),
  sourceType?: string(name='sourceType'),
  type?: string(name='type'),
  typesStr?: string(name='typesStr'),
  value?: string(name='value'),
}

model DescribeVariableListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      capacity?: long(name='capacity'),
      defineId?: string(name='defineId'),
      description?: string(name='description'),
      extendInfo?: map[string]any(name='extendInfo'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      leftCapacity?: long(name='leftCapacity'),
      name?: string(name='name'),
      outputsType?: string(name='outputsType'),
      refObjId?: string(name='refObjId'),
      refObjName?: string(name='refObjName'),
      refObjType?: string(name='refObjType'),
      sourceType?: string(name='sourceType'),
      title?: string(name='title'),
      type?: string(name='type'),
      userId?: long(name='userId'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeVariableListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVariableListResponseBody(name='body'),
}

/**
 * @summary 查询变量详情
 *
 * @param request DescribeVariableListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVariableListResponse
 */
async function describeVariableListWithOptions(request: DescribeVariableListRequest, runtime: Util.RuntimeOptions): DescribeVariableListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.refObjId)) {
    query['refObjId'] = request.refObjId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.sourceType)) {
    query['sourceType'] = request.sourceType;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  if (!Util.isUnset(request.typesStr)) {
    query['typesStr'] = request.typesStr;
  }
  if (!Util.isUnset(request.value)) {
    query['value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVariableList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量详情
 *
 * @param request DescribeVariableListRequest
 * @return DescribeVariableListResponse
 */
async function describeVariableList(request: DescribeVariableListRequest): DescribeVariableListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVariableListWithOptions(request, runtime);
}

model DescribeVariableMarketListRequest {
  lang?: string(name='Lang'),
  chargingMode?: string(name='chargingMode'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  paging?: string(name='paging'),
  queryContent?: string(name='queryContent'),
  regId?: string(name='regId'),
  scenesStr?: string(name='scenesStr'),
  source?: string(name='source'),
  title?: string(name='title'),
}

model DescribeVariableMarketListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: boolean(name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeVariableMarketListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVariableMarketListResponseBody(name='body'),
}

/**
 * @summary 查询变量定义
 *
 * @param request DescribeVariableMarketListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVariableMarketListResponse
 */
async function describeVariableMarketListWithOptions(request: DescribeVariableMarketListRequest, runtime: Util.RuntimeOptions): DescribeVariableMarketListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.chargingMode)) {
    query['chargingMode'] = request.chargingMode;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.paging)) {
    query['paging'] = request.paging;
  }
  if (!Util.isUnset(request.queryContent)) {
    query['queryContent'] = request.queryContent;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scenesStr)) {
    query['scenesStr'] = request.scenesStr;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVariableMarketList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量定义
 *
 * @param request DescribeVariableMarketListRequest
 * @return DescribeVariableMarketListResponse
 */
async function describeVariableMarketList(request: DescribeVariableMarketListRequest): DescribeVariableMarketListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVariableMarketListWithOptions(request, runtime);
}

model DescribeVariableSceneListRequest {
  lang?: string(name='Lang'),
  bizType?: string(name='bizType', description='This parameter is required.'),
  configKey?: string(name='configKey'),
  currentPage?: string(name='currentPage'),
  pageSize?: string(name='pageSize'),
  paging?: boolean(name='paging', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model DescribeVariableSceneListResponseBody = {
  requestId?: string(name='RequestId'),
  currentPage?: int32(name='currentPage'),
  pageSize?: int32(name='pageSize'),
  resultObject?: [ 
    {
      bizType?: string(name='bizType'),
      configKey?: string(name='configKey'),
      configValue?: string(name='configValue'),
      creator?: string(name='creator'),
      description?: string(name='description'),
      gmtCreate?: long(name='gmtCreate'),
      gmtModified?: long(name='gmtModified'),
      id?: long(name='id'),
      lastModifiedOperator?: string(name='lastModifiedOperator'),
      status?: string(name='status'),
    }
  ](name='resultObject'),
  totalItem?: int32(name='totalItem'),
  totalPage?: int32(name='totalPage'),
}

model DescribeVariableSceneListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVariableSceneListResponseBody(name='body'),
}

/**
 * @summary 查询配置信息
 *
 * @param request DescribeVariableSceneListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVariableSceneListResponse
 */
async function describeVariableSceneListWithOptions(request: DescribeVariableSceneListRequest, runtime: Util.RuntimeOptions): DescribeVariableSceneListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.bizType)) {
    query['bizType'] = request.bizType;
  }
  if (!Util.isUnset(request.configKey)) {
    query['configKey'] = request.configKey;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['currentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.paging)) {
    query['paging'] = request.paging;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVariableSceneList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询配置信息
 *
 * @param request DescribeVariableSceneListRequest
 * @return DescribeVariableSceneListResponse
 */
async function describeVariableSceneList(request: DescribeVariableSceneListRequest): DescribeVariableSceneListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVariableSceneListWithOptions(request, runtime);
}

model ExpressionTestRequest {
  lang?: string(name='Lang'),
  expression?: string(name='expression', description='This parameter is required.'),
  expressionVariable?: string(name='expressionVariable', description='This parameter is required.'),
  expressionVariableIds?: string(name='expressionVariableIds'),
  id?: long(name='id'),
  regId?: string(name='regId', description='This parameter is required.'),
  scene?: string(name='scene', description='This parameter is required.'),
}

model ExpressionTestResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model ExpressionTestResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExpressionTestResponseBody(name='body'),
}

/**
 * @summary 自定义变量测试
 *
 * @param request ExpressionTestRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExpressionTestResponse
 */
async function expressionTestWithOptions(request: ExpressionTestRequest, runtime: Util.RuntimeOptions): ExpressionTestResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.expression)) {
    query['expression'] = request.expression;
  }
  if (!Util.isUnset(request.expressionVariable)) {
    query['expressionVariable'] = request.expressionVariable;
  }
  if (!Util.isUnset(request.expressionVariableIds)) {
    query['expressionVariableIds'] = request.expressionVariableIds;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ExpressionTest',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 自定义变量测试
 *
 * @param request ExpressionTestRequest
 * @return ExpressionTestResponse
 */
async function expressionTest(request: ExpressionTestRequest): ExpressionTestResponse {
  var runtime = new Util.RuntimeOptions{};
  return expressionTestWithOptions(request, runtime);
}

model FileUploadRequest {
  fileName?: string(name='FileName'),
  fileUrl?: string(name='FileUrl'),
  lang?: string(name='Lang'),
  tab?: string(name='Tab'),
}

model FileUploadResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: string(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  resultObject?: string(name='ResultObject'),
}

model FileUploadResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: FileUploadResponseBody(name='body'),
}

/**
 * @summary 文件上传
 *
 * @param request FileUploadRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return FileUploadResponse
 */
async function fileUploadWithOptions(request: FileUploadRequest, runtime: Util.RuntimeOptions): FileUploadResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.fileName)) {
    query['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.fileUrl)) {
    query['FileUrl'] = request.fileUrl;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.tab)) {
    query['Tab'] = request.tab;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'FileUpload',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 文件上传
 *
 * @param request FileUploadRequest
 * @return FileUploadResponse
 */
async function fileUpload(request: FileUploadRequest): FileUploadResponse {
  var runtime = new Util.RuntimeOptions{};
  return fileUploadWithOptions(request, runtime);
}

model ImportNameListRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  data?: string(name='data'),
  description?: string(name='description'),
  importType?: string(name='importType', description='This parameter is required.'),
  nameListType?: string(name='nameListType'),
  regId?: string(name='regId'),
  title?: string(name='title', description='This parameter is required.'),
  variableId?: long(name='variableId'),
}

model ImportNameListResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model ImportNameListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportNameListResponseBody(name='body'),
}

/**
 * @summary 创建或导入名单
 *
 * @param request ImportNameListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportNameListResponse
 */
async function importNameListWithOptions(request: ImportNameListRequest, runtime: Util.RuntimeOptions): ImportNameListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.data)) {
    query['data'] = request.data;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.importType)) {
    query['importType'] = request.importType;
  }
  if (!Util.isUnset(request.nameListType)) {
    query['nameListType'] = request.nameListType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  if (!Util.isUnset(request.variableId)) {
    query['variableId'] = request.variableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ImportNameList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建或导入名单
 *
 * @param request ImportNameListRequest
 * @return ImportNameListResponse
 */
async function importNameList(request: ImportNameListRequest): ImportNameListResponse {
  var runtime = new Util.RuntimeOptions{};
  return importNameListWithOptions(request, runtime);
}

model ImportTemplateEventRequest {
  lang?: string(name='Lang'),
  eventTemplateIds?: string(name='eventTemplateIds'),
  regId?: string(name='regId'),
}

model ImportTemplateEventResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model ImportTemplateEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ImportTemplateEventResponseBody(name='body'),
}

/**
 * @summary 导入模板事件
 *
 * @param request ImportTemplateEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ImportTemplateEventResponse
 */
async function importTemplateEventWithOptions(request: ImportTemplateEventRequest, runtime: Util.RuntimeOptions): ImportTemplateEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventTemplateIds)) {
    query['eventTemplateIds'] = request.eventTemplateIds;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ImportTemplateEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导入模板事件
 *
 * @param request ImportTemplateEventRequest
 * @return ImportTemplateEventResponse
 */
async function importTemplateEvent(request: ImportTemplateEventRequest): ImportTemplateEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return importTemplateEventWithOptions(request, runtime);
}

model ModifyAppKeyRequest {
  lang?: string(name='Lang'),
  appKey?: string(name='appKey'),
  memo?: string(name='memo'),
  regId?: string(name='regId'),
}

model ModifyAppKeyResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model ModifyAppKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppKeyResponseBody(name='body'),
}

/**
 * @summary 更新备注
 *
 * @param request ModifyAppKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppKeyResponse
 */
async function modifyAppKeyWithOptions(request: ModifyAppKeyRequest, runtime: Util.RuntimeOptions): ModifyAppKeyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.appKey)) {
    query['appKey'] = request.appKey;
  }
  if (!Util.isUnset(request.memo)) {
    query['memo'] = request.memo;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyAppKey',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新备注
 *
 * @param request ModifyAppKeyRequest
 * @return ModifyAppKeyResponse
 */
async function modifyAppKey(request: ModifyAppKeyRequest): ModifyAppKeyResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyAppKeyWithOptions(request, runtime);
}

model ModifyCustVariableRequest {
  lang?: string(name='Lang'),
  condition?: string(name='condition'),
  dataVersion?: long(name='dataVersion', description='This parameter is required.'),
  description?: string(name='description'),
  eventCodes?: string(name='eventCodes'),
  id?: long(name='id', description='This parameter is required.'),
  name?: string(name='name', description='This parameter is required.'),
  outputs?: string(name='outputs'),
  regId?: string(name='regId'),
}

model ModifyCustVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: [ 
    {
      failType?: string(name='failType'),
      message?: string(name='message'),
      success?: boolean(name='success'),
    }
  ](name='resultObject'),
}

model ModifyCustVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyCustVariableResponseBody(name='body'),
}

/**
 * @summary 编辑累计变量
 *
 * @param request ModifyCustVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyCustVariableResponse
 */
async function modifyCustVariableWithOptions(request: ModifyCustVariableRequest, runtime: Util.RuntimeOptions): ModifyCustVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.condition)) {
    query['condition'] = request.condition;
  }
  if (!Util.isUnset(request.dataVersion)) {
    query['dataVersion'] = request.dataVersion;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCodes)) {
    query['eventCodes'] = request.eventCodes;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.outputs)) {
    query['outputs'] = request.outputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCustVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑累计变量
 *
 * @param request ModifyCustVariableRequest
 * @return ModifyCustVariableResponse
 */
async function modifyCustVariable(request: ModifyCustVariableRequest): ModifyCustVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCustVariableWithOptions(request, runtime);
}

model ModifyEventRequest {
  lang?: string(name='Lang'),
  bizVersion?: int32(name='bizVersion'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  inputFieldsStr?: string(name='inputFieldsStr'),
  memo?: string(name='memo'),
  regId?: string(name='regId'),
  templateType?: string(name='templateType'),
}

model ModifyEventResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyEventResponseBody(name='body'),
}

/**
 * @summary 编辑事件
 *
 * @param request ModifyEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyEventResponse
 */
async function modifyEventWithOptions(request: ModifyEventRequest, runtime: Util.RuntimeOptions): ModifyEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.bizVersion)) {
    query['bizVersion'] = request.bizVersion;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.inputFieldsStr)) {
    query['inputFieldsStr'] = request.inputFieldsStr;
  }
  if (!Util.isUnset(request.memo)) {
    query['memo'] = request.memo;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateType)) {
    query['templateType'] = request.templateType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑事件
 *
 * @param request ModifyEventRequest
 * @return ModifyEventResponse
 */
async function modifyEvent(request: ModifyEventRequest): ModifyEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyEventWithOptions(request, runtime);
}

model ModifyEventStatusRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  fromEventSatus?: string(name='fromEventSatus'),
  regId?: string(name='regId'),
  toEventSatus?: string(name='toEventSatus'),
}

model ModifyEventStatusResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyEventStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyEventStatusResponseBody(name='body'),
}

/**
 * @summary 修改事件状态
 *
 * @param request ModifyEventStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyEventStatusResponse
 */
async function modifyEventStatusWithOptions(request: ModifyEventStatusRequest, runtime: Util.RuntimeOptions): ModifyEventStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.fromEventSatus)) {
    query['fromEventSatus'] = request.fromEventSatus;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.toEventSatus)) {
    query['toEventSatus'] = request.toEventSatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyEventStatus',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改事件状态
 *
 * @param request ModifyEventStatusRequest
 * @return ModifyEventStatusResponse
 */
async function modifyEventStatus(request: ModifyEventStatusRequest): ModifyEventStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyEventStatusWithOptions(request, runtime);
}

model ModifyExpressionVariableRequest {
  lang?: string(name='Lang'),
  dataVersion?: long(name='dataVersion', description='This parameter is required.'),
  description?: string(name='description'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  expression?: string(name='expression', description='This parameter is required.'),
  expressionTitle?: string(name='expressionTitle', description='This parameter is required.'),
  expressionVariable?: string(name='expressionVariable'),
  id?: long(name='id', description='This parameter is required.'),
  outlier?: string(name='outlier', description='This parameter is required.'),
  outputs?: string(name='outputs', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  title?: string(name='title', description='This parameter is required.'),
}

model ModifyExpressionVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyExpressionVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyExpressionVariableResponseBody(name='body'),
}

/**
 * @summary 编辑自定义变量
 *
 * @param request ModifyExpressionVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyExpressionVariableResponse
 */
async function modifyExpressionVariableWithOptions(request: ModifyExpressionVariableRequest, runtime: Util.RuntimeOptions): ModifyExpressionVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataVersion)) {
    query['dataVersion'] = request.dataVersion;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.expression)) {
    query['expression'] = request.expression;
  }
  if (!Util.isUnset(request.expressionTitle)) {
    query['expressionTitle'] = request.expressionTitle;
  }
  if (!Util.isUnset(request.expressionVariable)) {
    query['expressionVariable'] = request.expressionVariable;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.outlier)) {
    query['outlier'] = request.outlier;
  }
  if (!Util.isUnset(request.outputs)) {
    query['outputs'] = request.outputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyExpressionVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑自定义变量
 *
 * @param request ModifyExpressionVariableRequest
 * @return ModifyExpressionVariableResponse
 */
async function modifyExpressionVariable(request: ModifyExpressionVariableRequest): ModifyExpressionVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyExpressionVariableWithOptions(request, runtime);
}

model ModifyFieldRequest {
  lang?: string(name='Lang'),
  classify?: string(name='classify'),
  description?: string(name='description'),
  enumData?: string(name='enumData'),
  id?: long(name='id'),
  name?: string(name='name'),
  regId?: string(name='regId', description='This parameter is required.'),
  title?: string(name='title'),
}

model ModifyFieldResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyFieldResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyFieldResponseBody(name='body'),
}

/**
 * @summary 修改字段
 *
 * @param request ModifyFieldRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyFieldResponse
 */
async function modifyFieldWithOptions(request: ModifyFieldRequest, runtime: Util.RuntimeOptions): ModifyFieldResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.classify)) {
    query['classify'] = request.classify;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.enumData)) {
    query['enumData'] = request.enumData;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyField',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改字段
 *
 * @param request ModifyFieldRequest
 * @return ModifyFieldResponse
 */
async function modifyField(request: ModifyFieldRequest): ModifyFieldResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyFieldWithOptions(request, runtime);
}

model ModifyPocTaskRequest {
  lang?: string(name='Lang'),
  accessType?: string(name='accessType'),
  config?: string(name='config'),
  fileName?: string(name='fileName'),
  fileType?: string(name='fileType'),
  fileUrl?: string(name='fileUrl'),
  reason?: string(name='reason'),
  regId?: string(name='regId'),
  serviceCode?: string(name='serviceCode'),
  serviceName?: string(name='serviceName'),
  taskId?: string(name='taskId'),
  taskName?: string(name='taskName'),
  type?: string(name='type'),
}

model ModifyPocTaskResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyPocTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyPocTaskResponseBody(name='body'),
}

/**
 * @summary 修改poc任务
 *
 * @param request ModifyPocTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyPocTaskResponse
 */
async function modifyPocTaskWithOptions(request: ModifyPocTaskRequest, runtime: Util.RuntimeOptions): ModifyPocTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.accessType)) {
    query['accessType'] = request.accessType;
  }
  if (!Util.isUnset(request.config)) {
    query['config'] = request.config;
  }
  if (!Util.isUnset(request.fileName)) {
    query['fileName'] = request.fileName;
  }
  if (!Util.isUnset(request.fileType)) {
    query['fileType'] = request.fileType;
  }
  if (!Util.isUnset(request.fileUrl)) {
    query['fileUrl'] = request.fileUrl;
  }
  if (!Util.isUnset(request.reason)) {
    query['reason'] = request.reason;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['serviceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.serviceName)) {
    query['serviceName'] = request.serviceName;
  }
  if (!Util.isUnset(request.taskId)) {
    query['taskId'] = request.taskId;
  }
  if (!Util.isUnset(request.taskName)) {
    query['taskName'] = request.taskName;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyPocTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改poc任务
 *
 * @param request ModifyPocTaskRequest
 * @return ModifyPocTaskResponse
 */
async function modifyPocTask(request: ModifyPocTaskRequest): ModifyPocTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyPocTaskWithOptions(request, runtime);
}

model ModifyRulePriorityRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  priority?: int32(name='priority'),
  regId?: string(name='regId'),
  ruleId?: long(name='ruleId'),
}

model ModifyRulePriorityResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyRulePriorityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyRulePriorityResponseBody(name='body'),
}

/**
 * @summary 策略修改优先级
 *
 * @param request ModifyRulePriorityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyRulePriorityResponse
 */
async function modifyRulePriorityWithOptions(request: ModifyRulePriorityRequest, runtime: Util.RuntimeOptions): ModifyRulePriorityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.priority)) {
    query['priority'] = request.priority;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyRulePriority',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 策略修改优先级
 *
 * @param request ModifyRulePriorityRequest
 * @return ModifyRulePriorityResponse
 */
async function modifyRulePriority(request: ModifyRulePriorityRequest): ModifyRulePriorityResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyRulePriorityWithOptions(request, runtime);
}

model ModifyRuleStatusRequest {
  lang?: string(name='Lang'),
  applyUserId?: string(name='applyUserId'),
  applyUserName?: string(name='applyUserName'),
  auditRemark?: string(name='auditRemark'),
  auditUserId?: string(name='auditUserId'),
  auditUserName?: string(name='auditUserName'),
  consoleRuleId?: long(name='consoleRuleId'),
  eventType?: string(name='eventType'),
  regId?: string(name='regId'),
  ruleAuditType?: string(name='ruleAuditType'),
  ruleId?: string(name='ruleId'),
  ruleVersionId?: long(name='ruleVersionId'),
}

model ModifyRuleStatusResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyRuleStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyRuleStatusResponseBody(name='body'),
}

/**
 * @summary 策略版本申请状态变更
 *
 * @param request ModifyRuleStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyRuleStatusResponse
 */
async function modifyRuleStatusWithOptions(request: ModifyRuleStatusRequest, runtime: Util.RuntimeOptions): ModifyRuleStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.applyUserId)) {
    query['applyUserId'] = request.applyUserId;
  }
  if (!Util.isUnset(request.applyUserName)) {
    query['applyUserName'] = request.applyUserName;
  }
  if (!Util.isUnset(request.auditRemark)) {
    query['auditRemark'] = request.auditRemark;
  }
  if (!Util.isUnset(request.auditUserId)) {
    query['auditUserId'] = request.auditUserId;
  }
  if (!Util.isUnset(request.auditUserName)) {
    query['auditUserName'] = request.auditUserName;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.eventType)) {
    query['eventType'] = request.eventType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleAuditType)) {
    query['ruleAuditType'] = request.ruleAuditType;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleVersionId)) {
    query['ruleVersionId'] = request.ruleVersionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyRuleStatus',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 策略版本申请状态变更
 *
 * @param request ModifyRuleStatusRequest
 * @return ModifyRuleStatusResponse
 */
async function modifyRuleStatus(request: ModifyRuleStatusRequest): ModifyRuleStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyRuleStatusWithOptions(request, runtime);
}

model ModifyTemplateRequest {
  lang?: string(name='Lang'),
  description?: string(name='description'),
  eventCode?: string(name='eventCode'),
  inputFields?: {
    description?: string(name='description'),
    fieldCode?: string(name='fieldCode'),
    fieldRank?: int32(name='fieldRank'),
    fieldSource?: string(name='fieldSource'),
    fieldType?: string(name='fieldType'),
    title?: string(name='title'),
  }(name='inputFields'),
  regId?: string(name='regId'),
  templateId?: long(name='templateId'),
  templateType?: string(name='templateType'),
  version?: int32(name='version'),
}

model ModifyTemplateResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyTemplateResponseBody(name='body'),
}

/**
 * @summary 修改模版
 *
 * @param request ModifyTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyTemplateResponse
 */
async function modifyTemplateWithOptions(request: ModifyTemplateRequest, runtime: Util.RuntimeOptions): ModifyTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.inputFields)) {
    query['inputFields'] = request.inputFields;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['templateId'] = request.templateId;
  }
  if (!Util.isUnset(request.templateType)) {
    query['templateType'] = request.templateType;
  }
  if (!Util.isUnset(request.version)) {
    query['version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyTemplate',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改模版
 *
 * @param request ModifyTemplateRequest
 * @return ModifyTemplateResponse
 */
async function modifyTemplate(request: ModifyTemplateRequest): ModifyTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyTemplateWithOptions(request, runtime);
}

model ModifyTemplateStatusRequest {
  lang?: string(name='Lang'),
  fromTemplateSatus?: string(name='fromTemplateSatus'),
  regId?: string(name='regId'),
  templateId?: long(name='templateId'),
  toTemplateSatus?: string(name='toTemplateSatus'),
}

model ModifyTemplateStatusResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyTemplateStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyTemplateStatusResponseBody(name='body'),
}

/**
 * @summary 更新模版状态
 *
 * @param request ModifyTemplateStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyTemplateStatusResponse
 */
async function modifyTemplateStatusWithOptions(request: ModifyTemplateStatusRequest, runtime: Util.RuntimeOptions): ModifyTemplateStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.fromTemplateSatus)) {
    query['fromTemplateSatus'] = request.fromTemplateSatus;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['templateId'] = request.templateId;
  }
  if (!Util.isUnset(request.toTemplateSatus)) {
    query['toTemplateSatus'] = request.toTemplateSatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyTemplateStatus',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新模版状态
 *
 * @param request ModifyTemplateStatusRequest
 * @return ModifyTemplateStatusResponse
 */
async function modifyTemplateStatus(request: ModifyTemplateStatusRequest): ModifyTemplateStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyTemplateStatusWithOptions(request, runtime);
}

model ModifyVariableRequest {
  lang?: string(name='Lang'),
  description?: string(name='description'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId'),
  title?: string(name='title', description='This parameter is required.'),
}

model ModifyVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model ModifyVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyVariableResponseBody(name='body'),
}

/**
 * @summary 修改变量信息
 *
 * @param request ModifyVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyVariableResponse
 */
async function modifyVariableWithOptions(request: ModifyVariableRequest, runtime: Util.RuntimeOptions): ModifyVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改变量信息
 *
 * @param request ModifyVariableRequest
 * @return ModifyVariableResponse
 */
async function modifyVariable(request: ModifyVariableRequest): ModifyVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyVariableWithOptions(request, runtime);
}

model OpenConsoleSlsRequest {
  lang?: string(name='Lang'),
  regId?: string(name='regId'),
  scene?: string(name='scene'),
}

model OpenConsoleSlsResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: string(name='resultObject'),
}

model OpenConsoleSlsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OpenConsoleSlsResponseBody(name='body'),
}

/**
 * @summary 开通服务
 *
 * @param request OpenConsoleSlsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OpenConsoleSlsResponse
 */
async function openConsoleSlsWithOptions(request: OpenConsoleSlsRequest, runtime: Util.RuntimeOptions): OpenConsoleSlsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.scene)) {
    query['scene'] = request.scene;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'OpenConsoleSls',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 开通服务
 *
 * @param request OpenConsoleSlsRequest
 * @return OpenConsoleSlsResponse
 */
async function openConsoleSls(request: OpenConsoleSlsRequest): OpenConsoleSlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return openConsoleSlsWithOptions(request, runtime);
}

model OperateFavoriteVariableRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  operate?: string(name='operate', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model OperateFavoriteVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model OperateFavoriteVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OperateFavoriteVariableResponseBody(name='body'),
}

/**
 * @summary 操作收藏
 *
 * @param request OperateFavoriteVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OperateFavoriteVariableResponse
 */
async function operateFavoriteVariableWithOptions(request: OperateFavoriteVariableRequest, runtime: Util.RuntimeOptions): OperateFavoriteVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.operate)) {
    query['operate'] = request.operate;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'OperateFavoriteVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 操作收藏
 *
 * @param request OperateFavoriteVariableRequest
 * @return OperateFavoriteVariableResponse
 */
async function operateFavoriteVariable(request: OperateFavoriteVariableRequest): OperateFavoriteVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return operateFavoriteVariableWithOptions(request, runtime);
}

model PermissionCheckRequest {
  lang?: string(name='Lang'),
  regId?: string(name='RegId'),
}

model PermissionCheckResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: string(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  resultObject?: string(name='ResultObject'),
}

model PermissionCheckResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PermissionCheckResponseBody(name='body'),
}

/**
 * @summary 企业认证
 *
 * @param request PermissionCheckRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PermissionCheckResponse
 */
async function permissionCheckWithOptions(request: PermissionCheckRequest, runtime: Util.RuntimeOptions): PermissionCheckResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['RegId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PermissionCheck',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 企业认证
 *
 * @param request PermissionCheckRequest
 * @return PermissionCheckResponse
 */
async function permissionCheck(request: PermissionCheckRequest): PermissionCheckResponse {
  var runtime = new Util.RuntimeOptions{};
  return permissionCheckWithOptions(request, runtime);
}

model QueryAuthRuleDetailByRuleIdRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  regId?: string(name='regId', description='This parameter is required.'),
  ruleId?: string(name='ruleId'),
  ruleVersionId?: long(name='ruleVersionId'),
}

model QueryAuthRuleDetailByRuleIdResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: {
    auditId?: long(name='auditId'),
    authType?: string(name='authType'),
    authUsers?: string(name='authUsers'),
    consoleRuleId?: long(name='consoleRuleId'),
    eventCode?: string(name='eventCode'),
    eventName?: string(name='eventName'),
    gmtCreate?: long(name='gmtCreate'),
    gmtModified?: long(name='gmtModified'),
    logicExpression?: string(name='logicExpression'),
    memo?: string(name='memo'),
    priority?: long(name='priority'),
    ruleActionMap?: map[string]string(name='ruleActionMap'),
    ruleActions?: string(name='ruleActions'),
    ruleAuthType?: string(name='ruleAuthType'),
    ruleExpressions?: string(name='ruleExpressions'),
    ruleId?: string(name='ruleId'),
    ruleName?: string(name='ruleName'),
    ruleStatus?: string(name='ruleStatus'),
    ruleVersionId?: long(name='ruleVersionId'),
    templateType?: string(name='templateType'),
    version?: long(name='version'),
  }(name='resultObject'),
}

model QueryAuthRuleDetailByRuleIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAuthRuleDetailByRuleIdResponseBody(name='body'),
}

/**
 * @summary 白盒化策略详情查询
 *
 * @param request QueryAuthRuleDetailByRuleIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAuthRuleDetailByRuleIdResponse
 */
async function queryAuthRuleDetailByRuleIdWithOptions(request: QueryAuthRuleDetailByRuleIdRequest, runtime: Util.RuntimeOptions): QueryAuthRuleDetailByRuleIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleVersionId)) {
    query['ruleVersionId'] = request.ruleVersionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAuthRuleDetailByRuleId',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 白盒化策略详情查询
 *
 * @param request QueryAuthRuleDetailByRuleIdRequest
 * @return QueryAuthRuleDetailByRuleIdResponse
 */
async function queryAuthRuleDetailByRuleId(request: QueryAuthRuleDetailByRuleIdRequest): QueryAuthRuleDetailByRuleIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAuthRuleDetailByRuleIdWithOptions(request, runtime);
}

model QueryAuthUserNameRequest {
  lang?: string(name='Lang'),
  bindId?: long(name='bindId'),
  regId?: string(name='regId'),
}

model QueryAuthUserNameResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: {
    company?: string(name='company'),
    userId?: long(name='userId'),
  }(name='resultObject'),
}

model QueryAuthUserNameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAuthUserNameResponseBody(name='body'),
}

/**
 * @summary 获取授权用户名
 *
 * @param request QueryAuthUserNameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAuthUserNameResponse
 */
async function queryAuthUserNameWithOptions(request: QueryAuthUserNameRequest, runtime: Util.RuntimeOptions): QueryAuthUserNameResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.bindId)) {
    query['bindId'] = request.bindId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAuthUserName',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取授权用户名
 *
 * @param request QueryAuthUserNameRequest
 * @return QueryAuthUserNameResponse
 */
async function queryAuthUserName(request: QueryAuthUserNameRequest): QueryAuthUserNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAuthUserNameWithOptions(request, runtime);
}

model QueryAuthorizationUserListRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  id?: long(name='id'),
  regId?: string(name='regId'),
}

model QueryAuthorizationUserListResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: [ 
    {
      company?: string(name='company'),
      id?: long(name='id'),
      uid?: string(name='uid'),
      userId?: long(name='userId'),
    }
  ](name='resultObject'),
}

model QueryAuthorizationUserListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAuthorizationUserListResponseBody(name='body'),
}

/**
 * @summary 事件模版授权用户列表
 *
 * @param request QueryAuthorizationUserListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAuthorizationUserListResponse
 */
async function queryAuthorizationUserListWithOptions(request: QueryAuthorizationUserListRequest, runtime: Util.RuntimeOptions): QueryAuthorizationUserListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAuthorizationUserList',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 事件模版授权用户列表
 *
 * @param request QueryAuthorizationUserListRequest
 * @return QueryAuthorizationUserListResponse
 */
async function queryAuthorizationUserList(request: QueryAuthorizationUserListRequest): QueryAuthorizationUserListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAuthorizationUserListWithOptions(request, runtime);
}

model RecallRuleAuditRequest {
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model RecallRuleAuditResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model RecallRuleAuditResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RecallRuleAuditResponseBody(name='body'),
}

/**
 * @summary 撤回
 *
 * @param request RecallRuleAuditRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RecallRuleAuditResponse
 */
async function recallRuleAuditWithOptions(request: RecallRuleAuditRequest, runtime: Util.RuntimeOptions): RecallRuleAuditResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RecallRuleAudit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 撤回
 *
 * @param request RecallRuleAuditRequest
 * @return RecallRuleAuditResponse
 */
async function recallRuleAudit(request: RecallRuleAuditRequest): RecallRuleAuditResponse {
  var runtime = new Util.RuntimeOptions{};
  return recallRuleAuditWithOptions(request, runtime);
}

model RemoveEventRequest {
  lang?: string(name='Lang'),
  createType?: string(name='createType'),
  eventCode?: string(name='eventCode'),
  id?: long(name='id'),
  regId?: string(name='regId'),
  templateCode?: string(name='templateCode'),
}

model RemoveEventResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model RemoveEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveEventResponseBody(name='body'),
}

/**
 * @summary 删除事件
 *
 * @param request RemoveEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveEventResponse
 */
async function removeEventWithOptions(request: RemoveEventRequest, runtime: Util.RuntimeOptions): RemoveEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.createType)) {
    query['createType'] = request.createType;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateCode)) {
    query['templateCode'] = request.templateCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除事件
 *
 * @param request RemoveEventRequest
 * @return RemoveEventResponse
 */
async function removeEvent(request: RemoveEventRequest): RemoveEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeEventWithOptions(request, runtime);
}

model RemoveTemplateRequest {
  lang?: string(name='Lang'),
  eventCode?: string(name='eventCode'),
  regId?: string(name='regId'),
  templateId?: long(name='templateId'),
  version?: int32(name='version'),
}

model RemoveTemplateResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model RemoveTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveTemplateResponseBody(name='body'),
}

/**
 * @summary 删除模版事件
 *
 * @param request RemoveTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveTemplateResponse
 */
async function removeTemplateWithOptions(request: RemoveTemplateRequest, runtime: Util.RuntimeOptions): RemoveTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['templateId'] = request.templateId;
  }
  if (!Util.isUnset(request.version)) {
    query['version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveTemplate',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除模版事件
 *
 * @param request RemoveTemplateRequest
 * @return RemoveTemplateResponse
 */
async function removeTemplate(request: RemoveTemplateRequest): RemoveTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeTemplateWithOptions(request, runtime);
}

model SampleFileDownloadRequest {
  lang?: string(name='Lang'),
  regId?: string(name='RegId'),
  tab?: string(name='Tab'),
}

model SampleFileDownloadResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: string(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  resultObject?: string(name='ResultObject'),
}

model SampleFileDownloadResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SampleFileDownloadResponseBody(name='body'),
}

/**
 * @summary 模板下载
 *
 * @param request SampleFileDownloadRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SampleFileDownloadResponse
 */
async function sampleFileDownloadWithOptions(request: SampleFileDownloadRequest, runtime: Util.RuntimeOptions): SampleFileDownloadResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['RegId'] = request.regId;
  }
  if (!Util.isUnset(request.tab)) {
    query['Tab'] = request.tab;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SampleFileDownload',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 模板下载
 *
 * @param request SampleFileDownloadRequest
 * @return SampleFileDownloadResponse
 */
async function sampleFileDownload(request: SampleFileDownloadRequest): SampleFileDownloadResponse {
  var runtime = new Util.RuntimeOptions{};
  return sampleFileDownloadWithOptions(request, runtime);
}

model SaveAnalysisColumnRequest {
  lang?: string(name='Lang'),
  columns?: string(name='columns', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
}

model SaveAnalysisColumnResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model SaveAnalysisColumnResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveAnalysisColumnResponseBody(name='body'),
}

/**
 * @summary 保存自定义列
 *
 * @param request SaveAnalysisColumnRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveAnalysisColumnResponse
 */
async function saveAnalysisColumnWithOptions(request: SaveAnalysisColumnRequest, runtime: Util.RuntimeOptions): SaveAnalysisColumnResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.columns)) {
    query['columns'] = request.columns;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveAnalysisColumn',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 保存自定义列
 *
 * @param request SaveAnalysisColumnRequest
 * @return SaveAnalysisColumnResponse
 */
async function saveAnalysisColumn(request: SaveAnalysisColumnRequest): SaveAnalysisColumnResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveAnalysisColumnWithOptions(request, runtime);
}

model SaveByPassOrShuntEventRequest {
  lang?: string(name='Lang'),
  eventId?: long(name='eventId'),
  eventName?: string(name='eventName'),
  eventType?: string(name='eventType'),
  regId?: string(name='regId'),
}

model SaveByPassOrShuntEventResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model SaveByPassOrShuntEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveByPassOrShuntEventResponseBody(name='body'),
}

/**
 * @summary 旁路/分流配置
 *
 * @param request SaveByPassOrShuntEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveByPassOrShuntEventResponse
 */
async function saveByPassOrShuntEventWithOptions(request: SaveByPassOrShuntEventRequest, runtime: Util.RuntimeOptions): SaveByPassOrShuntEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventId)) {
    query['eventId'] = request.eventId;
  }
  if (!Util.isUnset(request.eventName)) {
    query['eventName'] = request.eventName;
  }
  if (!Util.isUnset(request.eventType)) {
    query['eventType'] = request.eventType;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveByPassOrShuntEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 旁路/分流配置
 *
 * @param request SaveByPassOrShuntEventRequest
 * @return SaveByPassOrShuntEventResponse
 */
async function saveByPassOrShuntEvent(request: SaveByPassOrShuntEventRequest): SaveByPassOrShuntEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveByPassOrShuntEventWithOptions(request, runtime);
}

model StartOrStopByPassShuntEventRequest {
  lang?: string(name='Lang'),
  eventId?: long(name='eventId'),
  regId?: string(name='regId'),
  status?: string(name='status'),
}

model StartOrStopByPassShuntEventResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model StartOrStopByPassShuntEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartOrStopByPassShuntEventResponseBody(name='body'),
}

/**
 * @summary 开启/停止旁路事件
 *
 * @param request StartOrStopByPassShuntEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartOrStopByPassShuntEventResponse
 */
async function startOrStopByPassShuntEventWithOptions(request: StartOrStopByPassShuntEventRequest, runtime: Util.RuntimeOptions): StartOrStopByPassShuntEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventId)) {
    query['eventId'] = request.eventId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartOrStopByPassShuntEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 开启/停止旁路事件
 *
 * @param request StartOrStopByPassShuntEventRequest
 * @return StartOrStopByPassShuntEventResponse
 */
async function startOrStopByPassShuntEvent(request: StartOrStopByPassShuntEventRequest): StartOrStopByPassShuntEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return startOrStopByPassShuntEventWithOptions(request, runtime);
}

model StartSimulationTaskRequest {
  lang?: string(name='Lang'),
  id?: string(name='id', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model StartSimulationTaskResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model StartSimulationTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartSimulationTaskResponseBody(name='body'),
}

/**
 * @summary 开始执行任务
 *
 * @param request StartSimulationTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartSimulationTaskResponse
 */
async function startSimulationTaskWithOptions(request: StartSimulationTaskRequest, runtime: Util.RuntimeOptions): StartSimulationTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartSimulationTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 开始执行任务
 *
 * @param request StartSimulationTaskRequest
 * @return StartSimulationTaskResponse
 */
async function startSimulationTask(request: StartSimulationTaskRequest): StartSimulationTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return startSimulationTaskWithOptions(request, runtime);
}

model StopSimulationTaskRequest {
  lang?: string(name='Lang'),
  id?: string(name='id', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model StopSimulationTaskResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model StopSimulationTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopSimulationTaskResponseBody(name='body'),
}

/**
 * @summary 停止任务
 *
 * @param request StopSimulationTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopSimulationTaskResponse
 */
async function stopSimulationTaskWithOptions(request: StopSimulationTaskRequest, runtime: Util.RuntimeOptions): StopSimulationTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopSimulationTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 停止任务
 *
 * @param request StopSimulationTaskRequest
 * @return StopSimulationTaskResponse
 */
async function stopSimulationTask(request: StopSimulationTaskRequest): StopSimulationTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopSimulationTaskWithOptions(request, runtime);
}

model SubmitImportTaskRequest {
  lang?: string(name='Lang'),
  fileName?: string(name='fileName'),
  regId?: string(name='regId'),
  url?: string(name='url'),
}

model SubmitImportTaskResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model SubmitImportTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitImportTaskResponseBody(name='body'),
}

/**
 * @summary 批量创建策略
 *
 * @param request SubmitImportTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SubmitImportTaskResponse
 */
async function submitImportTaskWithOptions(request: SubmitImportTaskRequest, runtime: Util.RuntimeOptions): SubmitImportTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.fileName)) {
    query['fileName'] = request.fileName;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.url)) {
    query['url'] = request.url;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SubmitImportTask',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量创建策略
 *
 * @param request SubmitImportTaskRequest
 * @return SubmitImportTaskResponse
 */
async function submitImportTask(request: SubmitImportTaskRequest): SubmitImportTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitImportTaskWithOptions(request, runtime);
}

model SwitchExpressionVariableRequest {
  lang?: string(name='Lang'),
  dataVersion?: long(name='dataVersion', description='This parameter is required.'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  status?: string(name='status', description='This parameter is required.'),
}

model SwitchExpressionVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model SwitchExpressionVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SwitchExpressionVariableResponseBody(name='body'),
}

/**
 * @summary 自定义变量开关
 *
 * @param request SwitchExpressionVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SwitchExpressionVariableResponse
 */
async function switchExpressionVariableWithOptions(request: SwitchExpressionVariableRequest, runtime: Util.RuntimeOptions): SwitchExpressionVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataVersion)) {
    query['dataVersion'] = request.dataVersion;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SwitchExpressionVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 自定义变量开关
 *
 * @param request SwitchExpressionVariableRequest
 * @return SwitchExpressionVariableResponse
 */
async function switchExpressionVariable(request: SwitchExpressionVariableRequest): SwitchExpressionVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return switchExpressionVariableWithOptions(request, runtime);
}

model SwitchFieldRequest {
  lang?: string(name='Lang'),
  id?: long(name='id'),
  name?: string(name='name'),
  regId?: string(name='regId', description='This parameter is required.'),
  source?: string(name='source'),
  status?: string(name='status'),
}

model SwitchFieldResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model SwitchFieldResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SwitchFieldResponseBody(name='body'),
}

/**
 * @summary 字段开关
 *
 * @param request SwitchFieldRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SwitchFieldResponse
 */
async function switchFieldWithOptions(request: SwitchFieldRequest, runtime: Util.RuntimeOptions): SwitchFieldResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.source)) {
    query['source'] = request.source;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SwitchField',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 字段开关
 *
 * @param request SwitchFieldRequest
 * @return SwitchFieldResponse
 */
async function switchField(request: SwitchFieldRequest): SwitchFieldResponse {
  var runtime = new Util.RuntimeOptions{};
  return switchFieldWithOptions(request, runtime);
}

model SwitchQueryVariableRequest {
  lang?: string(name='Lang'),
  id?: long(name='id', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  status?: string(name='status'),
}

model SwitchQueryVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model SwitchQueryVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SwitchQueryVariableResponseBody(name='body'),
}

/**
 * @summary 查询变量启用/禁用
 *
 * @param request SwitchQueryVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SwitchQueryVariableResponse
 */
async function switchQueryVariableWithOptions(request: SwitchQueryVariableRequest, runtime: Util.RuntimeOptions): SwitchQueryVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SwitchQueryVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询变量启用/禁用
 *
 * @param request SwitchQueryVariableRequest
 * @return SwitchQueryVariableResponse
 */
async function switchQueryVariable(request: SwitchQueryVariableRequest): SwitchQueryVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return switchQueryVariableWithOptions(request, runtime);
}

model SwitchToOnlineRequest {
  lang?: string(name='Lang'),
  eventId?: long(name='eventId', description='This parameter is required.'),
  regId?: string(name='regId'),
}

model SwitchToOnlineResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model SwitchToOnlineResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SwitchToOnlineResponseBody(name='body'),
}

/**
 * @summary 一键切换上线
 *
 * @param request SwitchToOnlineRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SwitchToOnlineResponse
 */
async function switchToOnlineWithOptions(request: SwitchToOnlineRequest, runtime: Util.RuntimeOptions): SwitchToOnlineResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventId)) {
    query['eventId'] = request.eventId;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SwitchToOnline',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 一键切换上线
 *
 * @param request SwitchToOnlineRequest
 * @return SwitchToOnlineResponse
 */
async function switchToOnline(request: SwitchToOnlineRequest): SwitchToOnlineResponse {
  var runtime = new Util.RuntimeOptions{};
  return switchToOnlineWithOptions(request, runtime);
}

model SwitchVariableRequest {
  lang?: string(name='Lang'),
  dataVersion?: long(name='dataVersion'),
  id?: long(name='id'),
  name?: string(name='name'),
  regId?: string(name='regId'),
  status?: string(name='status'),
}

model SwitchVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model SwitchVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SwitchVariableResponseBody(name='body'),
}

/**
 * @summary 累计变量开关
 *
 * @param request SwitchVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SwitchVariableResponse
 */
async function switchVariableWithOptions(request: SwitchVariableRequest, runtime: Util.RuntimeOptions): SwitchVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataVersion)) {
    query['dataVersion'] = request.dataVersion;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.status)) {
    query['status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SwitchVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 累计变量开关
 *
 * @param request SwitchVariableRequest
 * @return SwitchVariableResponse
 */
async function switchVariable(request: SwitchVariableRequest): SwitchVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return switchVariableWithOptions(request, runtime);
}

model TaskNameByUserIdRequest {
  lang?: string(name='Lang'),
  regId?: string(name='RegId'),
  taskName?: string(name='TaskName'),
}

model TaskNameByUserIdResponseBody = {
  code?: string(name='Code'),
  httpStatusCode?: string(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='ResultObject'),
}

model TaskNameByUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TaskNameByUserIdResponseBody(name='body'),
}

/**
 * @summary 判断任务名是否重复
 *
 * @param request TaskNameByUserIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TaskNameByUserIdResponse
 */
async function taskNameByUserIdWithOptions(request: TaskNameByUserIdRequest, runtime: Util.RuntimeOptions): TaskNameByUserIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.regId)) {
    query['RegId'] = request.regId;
  }
  if (!Util.isUnset(request.taskName)) {
    query['TaskName'] = request.taskName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaskNameByUserId',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 判断任务名是否重复
 *
 * @param request TaskNameByUserIdRequest
 * @return TaskNameByUserIdResponse
 */
async function taskNameByUserId(request: TaskNameByUserIdRequest): TaskNameByUserIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return taskNameByUserIdWithOptions(request, runtime);
}

model UpdateAnalysisConditionFavoriteRequest {
  lang?: string(name='Lang'),
  condition?: string(name='condition'),
  eventBeginTime?: long(name='eventBeginTime'),
  eventCode?: string(name='eventCode'),
  eventEndTime?: long(name='eventEndTime'),
  fieldName?: string(name='fieldName'),
  fieldValue?: string(name='fieldValue'),
  id?: long(name='id', description='This parameter is required.'),
  name?: string(name='name'),
  regId?: string(name='regId', description='This parameter is required.'),
  type?: string(name='type'),
}

model UpdateAnalysisConditionFavoriteResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model UpdateAnalysisConditionFavoriteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAnalysisConditionFavoriteResponseBody(name='body'),
}

/**
 * @summary 修改查询条件
 *
 * @param request UpdateAnalysisConditionFavoriteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAnalysisConditionFavoriteResponse
 */
async function updateAnalysisConditionFavoriteWithOptions(request: UpdateAnalysisConditionFavoriteRequest, runtime: Util.RuntimeOptions): UpdateAnalysisConditionFavoriteResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.condition)) {
    query['condition'] = request.condition;
  }
  if (!Util.isUnset(request.eventBeginTime)) {
    query['eventBeginTime'] = request.eventBeginTime;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.eventEndTime)) {
    query['eventEndTime'] = request.eventEndTime;
  }
  if (!Util.isUnset(request.fieldName)) {
    query['fieldName'] = request.fieldName;
  }
  if (!Util.isUnset(request.fieldValue)) {
    query['fieldValue'] = request.fieldValue;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAnalysisConditionFavorite',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改查询条件
 *
 * @param request UpdateAnalysisConditionFavoriteRequest
 * @return UpdateAnalysisConditionFavoriteResponse
 */
async function updateAnalysisConditionFavorite(request: UpdateAnalysisConditionFavoriteRequest): UpdateAnalysisConditionFavoriteResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAnalysisConditionFavoriteWithOptions(request, runtime);
}

model UpdateAuditRequest {
  lang?: string(name='Lang'),
  auditMsg?: string(name='auditMsg'),
  auditRelationType?: string(name='auditRelationType'),
  auditStatus?: string(name='auditStatus'),
  id?: long(name='id'),
  regId?: string(name='regId'),
}

model UpdateAuditResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model UpdateAuditResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAuditResponseBody(name='body'),
}

/**
 * @summary 审批
 *
 * @param request UpdateAuditRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAuditResponse
 */
async function updateAuditWithOptions(request: UpdateAuditRequest, runtime: Util.RuntimeOptions): UpdateAuditResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.auditMsg)) {
    query['auditMsg'] = request.auditMsg;
  }
  if (!Util.isUnset(request.auditRelationType)) {
    query['auditRelationType'] = request.auditRelationType;
  }
  if (!Util.isUnset(request.auditStatus)) {
    query['auditStatus'] = request.auditStatus;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAudit',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 审批
 *
 * @param request UpdateAuditRequest
 * @return UpdateAuditResponse
 */
async function updateAudit(request: UpdateAuditRequest): UpdateAuditResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAuditWithOptions(request, runtime);
}

model UpdateAuthRuleRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  eventCode?: string(name='eventCode'),
  regId?: string(name='regId', description='This parameter is required.'),
  ruleActions?: string(name='ruleActions'),
  ruleExpressions?: string(name='ruleExpressions', description='This parameter is required.'),
  ruleId?: string(name='ruleId', description='This parameter is required.'),
  ruleVersionId?: long(name='ruleVersionId'),
}

model UpdateAuthRuleResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model UpdateAuthRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAuthRuleResponseBody(name='body'),
}

/**
 * @summary 修改授权策略
 *
 * @param request UpdateAuthRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAuthRuleResponse
 */
async function updateAuthRuleWithOptions(request: UpdateAuthRuleRequest, runtime: Util.RuntimeOptions): UpdateAuthRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleActions)) {
    query['ruleActions'] = request.ruleActions;
  }
  if (!Util.isUnset(request.ruleExpressions)) {
    query['ruleExpressions'] = request.ruleExpressions;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleVersionId)) {
    query['ruleVersionId'] = request.ruleVersionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAuthRule',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改授权策略
 *
 * @param request UpdateAuthRuleRequest
 * @return UpdateAuthRuleResponse
 */
async function updateAuthRule(request: UpdateAuthRuleRequest): UpdateAuthRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAuthRuleWithOptions(request, runtime);
}

model UpdateByPassShuntEventRequest {
  lang?: string(name='Lang'),
  eventId?: long(name='eventId'),
  eventName?: string(name='eventName'),
  regId?: string(name='regId'),
}

model UpdateByPassShuntEventResponseBody = {
  code?: string(name='code'),
  httpStatusCode?: string(name='httpStatusCode'),
  message?: string(name='message'),
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
  success?: boolean(name='success'),
}

model UpdateByPassShuntEventResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateByPassShuntEventResponseBody(name='body'),
}

/**
 * @summary 编辑旁路事件
 *
 * @param request UpdateByPassShuntEventRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateByPassShuntEventResponse
 */
async function updateByPassShuntEventWithOptions(request: UpdateByPassShuntEventRequest, runtime: Util.RuntimeOptions): UpdateByPassShuntEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.eventId)) {
    query['eventId'] = request.eventId;
  }
  if (!Util.isUnset(request.eventName)) {
    query['eventName'] = request.eventName;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateByPassShuntEvent',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑旁路事件
 *
 * @param request UpdateByPassShuntEventRequest
 * @return UpdateByPassShuntEventResponse
 */
async function updateByPassShuntEvent(request: UpdateByPassShuntEventRequest): UpdateByPassShuntEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateByPassShuntEventWithOptions(request, runtime);
}

model UpdateDataSourceRequest {
  lang?: string(name='Lang'),
  description?: string(name='description'),
  id?: long(name='id', description='This parameter is required.'),
  name?: string(name='name'),
  ossKey?: string(name='ossKey'),
  regId?: string(name='regId', description='This parameter is required.'),
  type?: string(name='type'),
}

model UpdateDataSourceResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model UpdateDataSourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateDataSourceResponseBody(name='body'),
}

/**
 * @summary 修改数据源
 *
 * @param request UpdateDataSourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateDataSourceResponse
 */
async function updateDataSourceWithOptions(request: UpdateDataSourceRequest, runtime: Util.RuntimeOptions): UpdateDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.ossKey)) {
    query['ossKey'] = request.ossKey;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDataSource',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改数据源
 *
 * @param request UpdateDataSourceRequest
 * @return UpdateDataSourceResponse
 */
async function updateDataSource(request: UpdateDataSourceRequest): UpdateDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDataSourceWithOptions(request, runtime);
}

model UpdateQueryVariableRequest {
  lang?: string(name='Lang'),
  dataSourceCode?: string(name='dataSourceCode', description='This parameter is required.'),
  description?: string(name='description'),
  eventCode?: string(name='eventCode', description='This parameter is required.'),
  expression?: string(name='expression', description='This parameter is required.'),
  expressionTitle?: string(name='expressionTitle', description='This parameter is required.'),
  expressionVariable?: string(name='expressionVariable', description='This parameter is required.'),
  id?: long(name='id', description='This parameter is required.'),
  outlier?: string(name='outlier', description='This parameter is required.'),
  outputs?: string(name='outputs', description='This parameter is required.'),
  regId?: string(name='regId', description='This parameter is required.'),
  title?: string(name='title', description='This parameter is required.'),
}

model UpdateQueryVariableResponseBody = {
  requestId?: string(name='RequestId'),
  resultObject?: boolean(name='resultObject'),
}

model UpdateQueryVariableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateQueryVariableResponseBody(name='body'),
}

/**
 * @summary 自定义查询变量修改
 *
 * @param request UpdateQueryVariableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateQueryVariableResponse
 */
async function updateQueryVariableWithOptions(request: UpdateQueryVariableRequest, runtime: Util.RuntimeOptions): UpdateQueryVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.dataSourceCode)) {
    query['dataSourceCode'] = request.dataSourceCode;
  }
  if (!Util.isUnset(request.description)) {
    query['description'] = request.description;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.expression)) {
    query['expression'] = request.expression;
  }
  if (!Util.isUnset(request.expressionTitle)) {
    query['expressionTitle'] = request.expressionTitle;
  }
  if (!Util.isUnset(request.expressionVariable)) {
    query['expressionVariable'] = request.expressionVariable;
  }
  if (!Util.isUnset(request.id)) {
    query['id'] = request.id;
  }
  if (!Util.isUnset(request.outlier)) {
    query['outlier'] = request.outlier;
  }
  if (!Util.isUnset(request.outputs)) {
    query['outputs'] = request.outputs;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.title)) {
    query['title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateQueryVariable',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 自定义查询变量修改
 *
 * @param request UpdateQueryVariableRequest
 * @return UpdateQueryVariableResponse
 */
async function updateQueryVariable(request: UpdateQueryVariableRequest): UpdateQueryVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateQueryVariableWithOptions(request, runtime);
}

model UpdateRuleRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  eventCode?: string(name='eventCode'),
  logicExpression?: string(name='logicExpression'),
  memo?: string(name='memo'),
  regId?: string(name='regId'),
  ruleActions?: string(name='ruleActions'),
  ruleExpressions?: string(name='ruleExpressions'),
  ruleId?: string(name='ruleId'),
  ruleName?: string(name='ruleName'),
  ruleStatus?: string(name='ruleStatus'),
  ruleVersionId?: long(name='ruleVersionId'),
}

model UpdateRuleResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model UpdateRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRuleResponseBody(name='body'),
}

/**
 * @summary 更新策略
 *
 * @param request UpdateRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRuleResponse
 */
async function updateRuleWithOptions(request: UpdateRuleRequest, runtime: Util.RuntimeOptions): UpdateRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.logicExpression)) {
    query['logicExpression'] = request.logicExpression;
  }
  if (!Util.isUnset(request.memo)) {
    query['memo'] = request.memo;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleActions)) {
    query['ruleActions'] = request.ruleActions;
  }
  if (!Util.isUnset(request.ruleExpressions)) {
    query['ruleExpressions'] = request.ruleExpressions;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.ruleStatus)) {
    query['ruleStatus'] = request.ruleStatus;
  }
  if (!Util.isUnset(request.ruleVersionId)) {
    query['ruleVersionId'] = request.ruleVersionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateRule',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新策略
 *
 * @param request UpdateRuleRequest
 * @return UpdateRuleResponse
 */
async function updateRule(request: UpdateRuleRequest): UpdateRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateRuleWithOptions(request, runtime);
}

model UpdateRuleBaseRequest {
  lang?: string(name='Lang'),
  consoleRuleId?: long(name='consoleRuleId'),
  eventCode?: string(name='eventCode'),
  memo?: string(name='memo'),
  regId?: string(name='regId'),
  ruleId?: string(name='ruleId'),
  ruleName?: string(name='ruleName'),
}

model UpdateRuleBaseResponseBody = {
  requestId?: string(name='requestId'),
  resultObject?: boolean(name='resultObject'),
}

model UpdateRuleBaseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRuleBaseResponseBody(name='body'),
}

/**
 * @summary 更新策略基础信息
 *
 * @param request UpdateRuleBaseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRuleBaseResponse
 */
async function updateRuleBaseWithOptions(request: UpdateRuleBaseRequest, runtime: Util.RuntimeOptions): UpdateRuleBaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.consoleRuleId)) {
    query['consoleRuleId'] = request.consoleRuleId;
  }
  if (!Util.isUnset(request.eventCode)) {
    query['eventCode'] = request.eventCode;
  }
  if (!Util.isUnset(request.memo)) {
    query['memo'] = request.memo;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['ruleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['ruleName'] = request.ruleName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateRuleBase',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新策略基础信息
 *
 * @param request UpdateRuleBaseRequest
 * @return UpdateRuleBaseResponse
 */
async function updateRuleBase(request: UpdateRuleBaseRequest): UpdateRuleBaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateRuleBaseWithOptions(request, runtime);
}

model UpdateSampleBatchRequest {
  lang?: string(name='Lang'),
  ids?: string(name='ids'),
  regId?: string(name='regId'),
  tags?: string(name='tags'),
  versions?: string(name='versions'),
}

model UpdateSampleBatchResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
}

model UpdateSampleBatchResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateSampleBatchResponseBody(name='body'),
}

/**
 * @summary 批量修改样本
 *
 * @param request UpdateSampleBatchRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateSampleBatchResponse
 */
async function updateSampleBatchWithOptions(request: UpdateSampleBatchRequest, runtime: Util.RuntimeOptions): UpdateSampleBatchResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.ids)) {
    query['ids'] = request.ids;
  }
  if (!Util.isUnset(request.regId)) {
    query['regId'] = request.regId;
  }
  if (!Util.isUnset(request.tags)) {
    query['tags'] = request.tags;
  }
  if (!Util.isUnset(request.versions)) {
    query['versions'] = request.versions;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSampleBatch',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量修改样本
 *
 * @param request UpdateSampleBatchRequest
 * @return UpdateSampleBatchResponse
 */
async function updateSampleBatch(request: UpdateSampleBatchRequest): UpdateSampleBatchResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateSampleBatchWithOptions(request, runtime);
}

model UploadSampleApiRequest {
  dataType?: string(name='DataType', description='This parameter is required.', example='ip'),
  dataValue?: string(name='DataValue', description='This parameter is required.', example='["123.124.125.126","123.124.125.127"]'),
  sampleType?: string(name='SampleType', description='This parameter is required.', example='block'),
  service?: string(name='Service', description='This parameter is required.', example='account_abuse,coupon_abuse,account_takeover'),
}

model UploadSampleApiResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='4A91D2D1-AEC9-1658-ABCE-5A39DE66A5C2'),
}

model UploadSampleApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UploadSampleApiResponseBody(name='body'),
}

/**
 * @summary 单用户API创建样本
 *
 * @param request UploadSampleApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UploadSampleApiResponse
 */
async function uploadSampleApiWithOptions(request: UploadSampleApiRequest, runtime: Util.RuntimeOptions): UploadSampleApiResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataType)) {
    query['DataType'] = request.dataType;
  }
  if (!Util.isUnset(request.dataValue)) {
    query['DataValue'] = request.dataValue;
  }
  if (!Util.isUnset(request.sampleType)) {
    query['SampleType'] = request.sampleType;
  }
  if (!Util.isUnset(request.service)) {
    query['Service'] = request.service;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadSampleApi',
    version = '2021-09-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 单用户API创建样本
 *
 * @param request UploadSampleApiRequest
 * @return UploadSampleApiResponse
 */
async function uploadSampleApi(request: UploadSampleApiRequest): UploadSampleApiResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadSampleApiWithOptions(request, runtime);
}

